﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace BaoShouTangServer.ApiModels
{
    public class pu_ArrHead
    {
        public pu_ArrHead()
        { }
        #region Model
        private int _ivtid;
        private string _ufts;
        private DateTime _ddate;
        private int _id;
        private string _ccode;
        private string _cptcode;
        private string _cptname;
        private string _cvencode;
        private string _cvenabbname;
        private string _cvenname;
        private string _cdepcode;
        private string _cdepname;
        private string _cpocode;
        private string _cpersoncode;
        private string _cpersonname;
        private string _cpaycode;
        private string _cpayname;
        private string _cexch_name;
        private string _cexch_code;
        private decimal? _iexchrate;
        private string _cmemo;
        private string _cbustype;
        private string _cmaker;
        private int _bnegative;
        private string _ccloser;
        private int? _idiscounttaxtype;
        private string _cdefine1;
        private string _cdefine2;
        private string _cdefine3;
        private DateTime? _cdefine4;
        private int? _cdefine5;
        private DateTime? _cdefine6;
        private decimal? _cdefine7;
        private string _cdefine8;
        private string _cdefine9;
        private string _cdefine10;
        private string _cdefine11;
        private string _cdefine12;
        private string _cdefine13;
        private string _cdefine14;
        private int? _cdefine15;
        private decimal? _cdefine16;
        private decimal? _itaxrate;
        private string _csccode;
        private string _cscname;
        private int? _cauthid;
        private string _cvendefine1;
        private string _cvendefine2;
        private string _cvendefine3;
        private string _cvendefine4;
        private string _cvendefine5;
        private string _cvendefine6;
        private string _cvendefine7;
        private string _cvendefine8;
        private string _cvendefine9;
        private string _cvendefine10;
        private int? _cvendefine11;
        private int? _cvendefine12;
        private decimal? _cvendefine13;
        private decimal? _cvendefine14;
        private DateTime? _cvendefine15;
        private DateTime? _cvendefine16;
        private int _ibilltype;
        private string _cvouchtype;
        private DateTime? _cmaketime;
        private DateTime? _cmodifytime;
        private DateTime? _cmodifydate;
        private string _creviser;
        private DateTime? _cauditdate;
        private DateTime? _caudittime;
        private string _cverifier;
        private int _iverifystateex;
        private int? _ireturncount;
        private bool _iswfcontrolled;
        private string _cvenpuomprotocol;
        private string _cvenpuomprotocolname;
        private string _cchanger;
        private DateTime? _dclosedate;
        private string _cvoucherstate;
        private int? _iflowid;
        private string _cflowname;
        private bool _bflowprocess;
        private int _bstoragearrivalorder;
        private int _iprintcount;
        private string _csysbarcode;
        private string _ccurrentauditor;
        /// <summary>
        /// 
        /// </summary>
        public int ivtid
        {
            set { _ivtid = value; }
            get { return _ivtid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ufts
        {
            set { _ufts = value; }
            get { return _ufts; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime ddate
        {
            set { _ddate = value; }
            get { return _ddate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ccode
        {
            set { _ccode = value; }
            get { return _ccode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cptcode
        {
            set { _cptcode = value; }
            get { return _cptcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cptname
        {
            set { _cptname = value; }
            get { return _cptname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvencode
        {
            set { _cvencode = value; }
            get { return _cvencode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvenabbname
        {
            set { _cvenabbname = value; }
            get { return _cvenabbname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvenname
        {
            set { _cvenname = value; }
            get { return _cvenname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdepcode
        {
            set { _cdepcode = value; }
            get { return _cdepcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdepname
        {
            set { _cdepname = value; }
            get { return _cdepname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cpocode
        {
            set { _cpocode = value; }
            get { return _cpocode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cpersoncode
        {
            set { _cpersoncode = value; }
            get { return _cpersoncode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cpersonname
        {
            set { _cpersonname = value; }
            get { return _cpersonname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cpaycode
        {
            set { _cpaycode = value; }
            get { return _cpaycode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cpayname
        {
            set { _cpayname = value; }
            get { return _cpayname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cexch_name
        {
            set { _cexch_name = value; }
            get { return _cexch_name; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cexch_code
        {
            set { _cexch_code = value; }
            get { return _cexch_code; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iexchrate
        {
            set { _iexchrate = value; }
            get { return _iexchrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cmemo
        {
            set { _cmemo = value; }
            get { return _cmemo; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbustype
        {
            set { _cbustype = value; }
            get { return _cbustype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cmaker
        {
            set { _cmaker = value; }
            get { return _cmaker; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int bnegative
        {
            set { _bnegative = value; }
            get { return _bnegative; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ccloser
        {
            set { _ccloser = value; }
            get { return _ccloser; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? idiscounttaxtype
        {
            set { _idiscounttaxtype = value; }
            get { return _idiscounttaxtype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine1
        {
            set { _cdefine1 = value; }
            get { return _cdefine1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine2
        {
            set { _cdefine2 = value; }
            get { return _cdefine2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine3
        {
            set { _cdefine3 = value; }
            get { return _cdefine3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cdefine4
        {
            set { _cdefine4 = value; }
            get { return _cdefine4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cdefine5
        {
            set { _cdefine5 = value; }
            get { return _cdefine5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cdefine6
        {
            set { _cdefine6 = value; }
            get { return _cdefine6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cdefine7
        {
            set { _cdefine7 = value; }
            get { return _cdefine7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine8
        {
            set { _cdefine8 = value; }
            get { return _cdefine8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine9
        {
            set { _cdefine9 = value; }
            get { return _cdefine9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine10
        {
            set { _cdefine10 = value; }
            get { return _cdefine10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine11
        {
            set { _cdefine11 = value; }
            get { return _cdefine11; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine12
        {
            set { _cdefine12 = value; }
            get { return _cdefine12; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine13
        {
            set { _cdefine13 = value; }
            get { return _cdefine13; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine14
        {
            set { _cdefine14 = value; }
            get { return _cdefine14; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cdefine15
        {
            set { _cdefine15 = value; }
            get { return _cdefine15; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cdefine16
        {
            set { _cdefine16 = value; }
            get { return _cdefine16; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? itaxrate
        {
            set { _itaxrate = value; }
            get { return _itaxrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csccode
        {
            set { _csccode = value; }
            get { return _csccode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cscname
        {
            set { _cscname = value; }
            get { return _cscname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cauthid
        {
            set { _cauthid = value; }
            get { return _cauthid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine1
        {
            set { _cvendefine1 = value; }
            get { return _cvendefine1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine2
        {
            set { _cvendefine2 = value; }
            get { return _cvendefine2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine3
        {
            set { _cvendefine3 = value; }
            get { return _cvendefine3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine4
        {
            set { _cvendefine4 = value; }
            get { return _cvendefine4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine5
        {
            set { _cvendefine5 = value; }
            get { return _cvendefine5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine6
        {
            set { _cvendefine6 = value; }
            get { return _cvendefine6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine7
        {
            set { _cvendefine7 = value; }
            get { return _cvendefine7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine8
        {
            set { _cvendefine8 = value; }
            get { return _cvendefine8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine9
        {
            set { _cvendefine9 = value; }
            get { return _cvendefine9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvendefine10
        {
            set { _cvendefine10 = value; }
            get { return _cvendefine10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cvendefine11
        {
            set { _cvendefine11 = value; }
            get { return _cvendefine11; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cvendefine12
        {
            set { _cvendefine12 = value; }
            get { return _cvendefine12; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cvendefine13
        {
            set { _cvendefine13 = value; }
            get { return _cvendefine13; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cvendefine14
        {
            set { _cvendefine14 = value; }
            get { return _cvendefine14; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cvendefine15
        {
            set { _cvendefine15 = value; }
            get { return _cvendefine15; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cvendefine16
        {
            set { _cvendefine16 = value; }
            get { return _cvendefine16; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int ibilltype
        {
            set { _ibilltype = value; }
            get { return _ibilltype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvouchtype
        {
            set { _cvouchtype = value; }
            get { return _cvouchtype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cmaketime
        {
            set { _cmaketime = value; }
            get { return _cmaketime; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cmodifytime
        {
            set { _cmodifytime = value; }
            get { return _cmodifytime; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cmodifydate
        {
            set { _cmodifydate = value; }
            get { return _cmodifydate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string creviser
        {
            set { _creviser = value; }
            get { return _creviser; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cauditdate
        {
            set { _cauditdate = value; }
            get { return _cauditdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? caudittime
        {
            set { _caudittime = value; }
            get { return _caudittime; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cverifier
        {
            set { _cverifier = value; }
            get { return _cverifier; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int iverifystateex
        {
            set { _iverifystateex = value; }
            get { return _iverifystateex; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ireturncount
        {
            set { _ireturncount = value; }
            get { return _ireturncount; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool iswfcontrolled
        {
            set { _iswfcontrolled = value; }
            get { return _iswfcontrolled; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvenpuomprotocol
        {
            set { _cvenpuomprotocol = value; }
            get { return _cvenpuomprotocol; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvenpuomprotocolname
        {
            set { _cvenpuomprotocolname = value; }
            get { return _cvenpuomprotocolname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cchanger
        {
            set { _cchanger = value; }
            get { return _cchanger; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? dclosedate
        {
            set { _dclosedate = value; }
            get { return _dclosedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cvoucherstate
        {
            set { _cvoucherstate = value; }
            get { return _cvoucherstate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iflowid
        {
            set { _iflowid = value; }
            get { return _iflowid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cflowname
        {
            set { _cflowname = value; }
            get { return _cflowname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool bflowprocess
        {
            set { _bflowprocess = value; }
            get { return _bflowprocess; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int bstoragearrivalorder
        {
            set { _bstoragearrivalorder = value; }
            get { return _bstoragearrivalorder; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int iprintcount
        {
            set { _iprintcount = value; }
            get { return _iprintcount; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csysbarcode
        {
            set { _csysbarcode = value; }
            get { return _csysbarcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ccurrentauditor
        {
            set { _ccurrentauditor = value; }
            get { return _ccurrentauditor; }
        }
        #endregion Model


        #region  Method

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public pu_ArrHead(int ivtid, string ufts, DateTime ddate, int id, string ccode, string cptcode, string cptname, string cvencode, string cvenabbname, string cvenname, string cdepcode, string cdepname, string cpocode, string cpersoncode, string cpersonname, string cpaycode, string cpayname, string cexch_name, string cexch_code, decimal iexchrate, string cmemo, string cbustype, string cmaker, int bnegative, string ccloser, int idiscounttaxtype, string cdefine1, string cdefine2, string cdefine3, DateTime cdefine4, int cdefine5, DateTime cdefine6, decimal cdefine7, string cdefine8, string cdefine9, string cdefine10, string cdefine11, string cdefine12, string cdefine13, string cdefine14, int cdefine15, decimal cdefine16, decimal itaxrate, string csccode, string cscname, int cauthid, string cvendefine1, string cvendefine2, string cvendefine3, string cvendefine4, string cvendefine5, string cvendefine6, string cvendefine7, string cvendefine8, string cvendefine9, string cvendefine10, int cvendefine11, int cvendefine12, decimal cvendefine13, decimal cvendefine14, DateTime cvendefine15, DateTime cvendefine16, int ibilltype, string cvouchtype, DateTime cmaketime, DateTime cmodifytime, DateTime cmodifydate, string creviser, DateTime cauditdate, DateTime caudittime, string cverifier, int iverifystateex, int ireturncount, bool iswfcontrolled, string cvenpuomprotocol, string cvenpuomprotocolname, string cchanger, DateTime dclosedate, string cvoucherstate, int iflowid, string cflowname, bool bflowprocess, int bstoragearrivalorder, int iprintcount, string csysbarcode, string ccurrentauditor)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ivtid,ufts,ddate,id,ccode,cptcode,cptname,cvencode,cvenabbname,cvenname,cdepcode,cdepname,cpocode,cpersoncode,cpersonname,cpaycode,cpayname,cexch_name,cexch_code,iexchrate,cmemo,cbustype,cmaker,bnegative,ccloser,idiscounttaxtype,cdefine1,cdefine2,cdefine3,cdefine4,cdefine5,cdefine6,cdefine7,cdefine8,cdefine9,cdefine10,cdefine11,cdefine12,cdefine13,cdefine14,cdefine15,cdefine16,itaxrate,csccode,cscname,cauthid,cvendefine1,cvendefine2,cvendefine3,cvendefine4,cvendefine5,cvendefine6,cvendefine7,cvendefine8,cvendefine9,cvendefine10,cvendefine11,cvendefine12,cvendefine13,cvendefine14,cvendefine15,cvendefine16,ibilltype,cvouchtype,cmaketime,cmodifytime,cmodifydate,creviser,cauditdate,caudittime,cverifier,iverifystateex,ireturncount,iswfcontrolled,cvenpuomprotocol,cvenpuomprotocolname,cchanger,dclosedate,cvoucherstate,iflowid,cflowname,bflowprocess,bstoragearrivalorder,iprintcount,csysbarcode,ccurrentauditor ");
            strSql.Append(" FROM [pu_ArrHead] ");
            strSql.Append(" where ivtid=@ivtid and ufts=@ufts and ddate=@ddate and id=@id and ccode=@ccode and cptcode=@cptcode and cptname=@cptname and cvencode=@cvencode and cvenabbname=@cvenabbname and cvenname=@cvenname and cdepcode=@cdepcode and cdepname=@cdepname and cpocode=@cpocode and cpersoncode=@cpersoncode and cpersonname=@cpersonname and cpaycode=@cpaycode and cpayname=@cpayname and cexch_name=@cexch_name and cexch_code=@cexch_code and iexchrate=@iexchrate and cmemo=@cmemo and cbustype=@cbustype and cmaker=@cmaker and bnegative=@bnegative and ccloser=@ccloser and idiscounttaxtype=@idiscounttaxtype and cdefine1=@cdefine1 and cdefine2=@cdefine2 and cdefine3=@cdefine3 and cdefine4=@cdefine4 and cdefine5=@cdefine5 and cdefine6=@cdefine6 and cdefine7=@cdefine7 and cdefine8=@cdefine8 and cdefine9=@cdefine9 and cdefine10=@cdefine10 and cdefine11=@cdefine11 and cdefine12=@cdefine12 and cdefine13=@cdefine13 and cdefine14=@cdefine14 and cdefine15=@cdefine15 and cdefine16=@cdefine16 and itaxrate=@itaxrate and csccode=@csccode and cscname=@cscname and cauthid=@cauthid and cvendefine1=@cvendefine1 and cvendefine2=@cvendefine2 and cvendefine3=@cvendefine3 and cvendefine4=@cvendefine4 and cvendefine5=@cvendefine5 and cvendefine6=@cvendefine6 and cvendefine7=@cvendefine7 and cvendefine8=@cvendefine8 and cvendefine9=@cvendefine9 and cvendefine10=@cvendefine10 and cvendefine11=@cvendefine11 and cvendefine12=@cvendefine12 and cvendefine13=@cvendefine13 and cvendefine14=@cvendefine14 and cvendefine15=@cvendefine15 and cvendefine16=@cvendefine16 and ibilltype=@ibilltype and cvouchtype=@cvouchtype and cmaketime=@cmaketime and cmodifytime=@cmodifytime and cmodifydate=@cmodifydate and creviser=@creviser and cauditdate=@cauditdate and caudittime=@caudittime and cverifier=@cverifier and iverifystateex=@iverifystateex and ireturncount=@ireturncount and iswfcontrolled=@iswfcontrolled and cvenpuomprotocol=@cvenpuomprotocol and cvenpuomprotocolname=@cvenpuomprotocolname and cchanger=@cchanger and dclosedate=@dclosedate and cvoucherstate=@cvoucherstate and iflowid=@iflowid and cflowname=@cflowname and bflowprocess=@bflowprocess and bstoragearrivalorder=@bstoragearrivalorder and iprintcount=@iprintcount and csysbarcode=@csysbarcode and ccurrentauditor=@ccurrentauditor ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ivtid", SqlDbType.Int,4),
                    new SqlParameter("@ufts", SqlDbType.Char,10),
                    new SqlParameter("@ddate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@ccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvencode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenabbname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersoncode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersonname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpaycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpayname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_code", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iexchrate", SqlDbType.Float),
                    new SqlParameter("@cmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbustype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaker", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bnegative", SqlDbType.Int,4),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@idiscounttaxtype", SqlDbType.TinyInt),
                    new SqlParameter("@cdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine4", SqlDbType.DateTime),
                    new SqlParameter("@cdefine5", SqlDbType.Int,4),
                    new SqlParameter("@cdefine6", SqlDbType.DateTime),
                    new SqlParameter("@cdefine7", SqlDbType.Float),
                    new SqlParameter("@cdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine11", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine12", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine13", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine14", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine15", SqlDbType.Int,4),
                    new SqlParameter("@cdefine16", SqlDbType.Float),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@csccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cscname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauthid", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine11", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine12", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine13", SqlDbType.Float),
                    new SqlParameter("@cvendefine14", SqlDbType.Float),
                    new SqlParameter("@cvendefine15", SqlDbType.DateTime),
                    new SqlParameter("@cvendefine16", SqlDbType.DateTime),
                    new SqlParameter("@ibilltype", SqlDbType.TinyInt),
                    new SqlParameter("@cvouchtype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaketime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifytime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifydate", SqlDbType.DateTime),
                    new SqlParameter("@creviser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauditdate", SqlDbType.DateTime),
                    new SqlParameter("@caudittime", SqlDbType.DateTime),
                    new SqlParameter("@cverifier", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iverifystateex", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.Int,4),
                    new SqlParameter("@iswfcontrolled", SqlDbType.Bit,1),
                    new SqlParameter("@cvenpuomprotocol", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenpuomprotocolname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cchanger", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cvoucherstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@cflowname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bflowprocess", SqlDbType.Bit,1),
                    new SqlParameter("@bstoragearrivalorder", SqlDbType.Int,4),
                    new SqlParameter("@iprintcount", SqlDbType.Int,4),
                    new SqlParameter("@csysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccurrentauditor", SqlDbType.NVarChar,-1)};
            parameters[0].Value = ivtid;
            parameters[1].Value = ufts;
            parameters[2].Value = ddate;
            parameters[3].Value = id;
            parameters[4].Value = ccode;
            parameters[5].Value = cptcode;
            parameters[6].Value = cptname;
            parameters[7].Value = cvencode;
            parameters[8].Value = cvenabbname;
            parameters[9].Value = cvenname;
            parameters[10].Value = cdepcode;
            parameters[11].Value = cdepname;
            parameters[12].Value = cpocode;
            parameters[13].Value = cpersoncode;
            parameters[14].Value = cpersonname;
            parameters[15].Value = cpaycode;
            parameters[16].Value = cpayname;
            parameters[17].Value = cexch_name;
            parameters[18].Value = cexch_code;
            parameters[19].Value = iexchrate;
            parameters[20].Value = cmemo;
            parameters[21].Value = cbustype;
            parameters[22].Value = cmaker;
            parameters[23].Value = bnegative;
            parameters[24].Value = ccloser;
            parameters[25].Value = idiscounttaxtype;
            parameters[26].Value = cdefine1;
            parameters[27].Value = cdefine2;
            parameters[28].Value = cdefine3;
            parameters[29].Value = cdefine4;
            parameters[30].Value = cdefine5;
            parameters[31].Value = cdefine6;
            parameters[32].Value = cdefine7;
            parameters[33].Value = cdefine8;
            parameters[34].Value = cdefine9;
            parameters[35].Value = cdefine10;
            parameters[36].Value = cdefine11;
            parameters[37].Value = cdefine12;
            parameters[38].Value = cdefine13;
            parameters[39].Value = cdefine14;
            parameters[40].Value = cdefine15;
            parameters[41].Value = cdefine16;
            parameters[42].Value = itaxrate;
            parameters[43].Value = csccode;
            parameters[44].Value = cscname;
            parameters[45].Value = cauthid;
            parameters[46].Value = cvendefine1;
            parameters[47].Value = cvendefine2;
            parameters[48].Value = cvendefine3;
            parameters[49].Value = cvendefine4;
            parameters[50].Value = cvendefine5;
            parameters[51].Value = cvendefine6;
            parameters[52].Value = cvendefine7;
            parameters[53].Value = cvendefine8;
            parameters[54].Value = cvendefine9;
            parameters[55].Value = cvendefine10;
            parameters[56].Value = cvendefine11;
            parameters[57].Value = cvendefine12;
            parameters[58].Value = cvendefine13;
            parameters[59].Value = cvendefine14;
            parameters[60].Value = cvendefine15;
            parameters[61].Value = cvendefine16;
            parameters[62].Value = ibilltype;
            parameters[63].Value = cvouchtype;
            parameters[64].Value = cmaketime;
            parameters[65].Value = cmodifytime;
            parameters[66].Value = cmodifydate;
            parameters[67].Value = creviser;
            parameters[68].Value = cauditdate;
            parameters[69].Value = caudittime;
            parameters[70].Value = cverifier;
            parameters[71].Value = iverifystateex;
            parameters[72].Value = ireturncount;
            parameters[73].Value = iswfcontrolled;
            parameters[74].Value = cvenpuomprotocol;
            parameters[75].Value = cvenpuomprotocolname;
            parameters[76].Value = cchanger;
            parameters[77].Value = dclosedate;
            parameters[78].Value = cvoucherstate;
            parameters[79].Value = iflowid;
            parameters[80].Value = cflowname;
            parameters[81].Value = bflowprocess;
            parameters[82].Value = bstoragearrivalorder;
            parameters[83].Value = iprintcount;
            parameters[84].Value = csysbarcode;
            parameters[85].Value = ccurrentauditor;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ivtid"] != null && ds.Tables[0].Rows[0]["ivtid"].ToString() != "")
                {
                    this.ivtid = int.Parse(ds.Tables[0].Rows[0]["ivtid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ufts"] != null)
                {
                    this.ufts = ds.Tables[0].Rows[0]["ufts"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ddate"] != null && ds.Tables[0].Rows[0]["ddate"].ToString() != "")
                {
                    this.ddate = DateTime.Parse(ds.Tables[0].Rows[0]["ddate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["id"] != null && ds.Tables[0].Rows[0]["id"].ToString() != "")
                {
                    this.id = int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ccode"] != null)
                {
                    this.ccode = ds.Tables[0].Rows[0]["ccode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cptcode"] != null)
                {
                    this.cptcode = ds.Tables[0].Rows[0]["cptcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cptname"] != null)
                {
                    this.cptname = ds.Tables[0].Rows[0]["cptname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvencode"] != null)
                {
                    this.cvencode = ds.Tables[0].Rows[0]["cvencode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvenabbname"] != null)
                {
                    this.cvenabbname = ds.Tables[0].Rows[0]["cvenabbname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvenname"] != null)
                {
                    this.cvenname = ds.Tables[0].Rows[0]["cvenname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdepcode"] != null)
                {
                    this.cdepcode = ds.Tables[0].Rows[0]["cdepcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdepname"] != null)
                {
                    this.cdepname = ds.Tables[0].Rows[0]["cdepname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpocode"] != null)
                {
                    this.cpocode = ds.Tables[0].Rows[0]["cpocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpersoncode"] != null)
                {
                    this.cpersoncode = ds.Tables[0].Rows[0]["cpersoncode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpersonname"] != null)
                {
                    this.cpersonname = ds.Tables[0].Rows[0]["cpersonname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpaycode"] != null)
                {
                    this.cpaycode = ds.Tables[0].Rows[0]["cpaycode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpayname"] != null)
                {
                    this.cpayname = ds.Tables[0].Rows[0]["cpayname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cexch_name"] != null)
                {
                    this.cexch_name = ds.Tables[0].Rows[0]["cexch_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cexch_code"] != null)
                {
                    this.cexch_code = ds.Tables[0].Rows[0]["cexch_code"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iexchrate"] != null && ds.Tables[0].Rows[0]["iexchrate"].ToString() != "")
                {
                    this.iexchrate = decimal.Parse(ds.Tables[0].Rows[0]["iexchrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmemo"] != null)
                {
                    this.cmemo = ds.Tables[0].Rows[0]["cmemo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbustype"] != null)
                {
                    this.cbustype = ds.Tables[0].Rows[0]["cbustype"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cmaker"] != null)
                {
                    this.cmaker = ds.Tables[0].Rows[0]["cmaker"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bnegative"] != null && ds.Tables[0].Rows[0]["bnegative"].ToString() != "")
                {
                    this.bnegative = int.Parse(ds.Tables[0].Rows[0]["bnegative"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ccloser"] != null)
                {
                    this.ccloser = ds.Tables[0].Rows[0]["ccloser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["idiscounttaxtype"] != null && ds.Tables[0].Rows[0]["idiscounttaxtype"].ToString() != "")
                {
                    this.idiscounttaxtype = int.Parse(ds.Tables[0].Rows[0]["idiscounttaxtype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine1"] != null)
                {
                    this.cdefine1 = ds.Tables[0].Rows[0]["cdefine1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine2"] != null)
                {
                    this.cdefine2 = ds.Tables[0].Rows[0]["cdefine2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine3"] != null)
                {
                    this.cdefine3 = ds.Tables[0].Rows[0]["cdefine3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine4"] != null && ds.Tables[0].Rows[0]["cdefine4"].ToString() != "")
                {
                    this.cdefine4 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine4"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine5"] != null && ds.Tables[0].Rows[0]["cdefine5"].ToString() != "")
                {
                    this.cdefine5 = int.Parse(ds.Tables[0].Rows[0]["cdefine5"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine6"] != null && ds.Tables[0].Rows[0]["cdefine6"].ToString() != "")
                {
                    this.cdefine6 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine6"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine7"] != null && ds.Tables[0].Rows[0]["cdefine7"].ToString() != "")
                {
                    this.cdefine7 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine7"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine8"] != null)
                {
                    this.cdefine8 = ds.Tables[0].Rows[0]["cdefine8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine9"] != null)
                {
                    this.cdefine9 = ds.Tables[0].Rows[0]["cdefine9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine10"] != null)
                {
                    this.cdefine10 = ds.Tables[0].Rows[0]["cdefine10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine11"] != null)
                {
                    this.cdefine11 = ds.Tables[0].Rows[0]["cdefine11"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine12"] != null)
                {
                    this.cdefine12 = ds.Tables[0].Rows[0]["cdefine12"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine13"] != null)
                {
                    this.cdefine13 = ds.Tables[0].Rows[0]["cdefine13"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine14"] != null)
                {
                    this.cdefine14 = ds.Tables[0].Rows[0]["cdefine14"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine15"] != null && ds.Tables[0].Rows[0]["cdefine15"].ToString() != "")
                {
                    this.cdefine15 = int.Parse(ds.Tables[0].Rows[0]["cdefine15"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine16"] != null && ds.Tables[0].Rows[0]["cdefine16"].ToString() != "")
                {
                    this.cdefine16 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine16"].ToString());
                }
                if (ds.Tables[0].Rows[0]["itaxrate"] != null && ds.Tables[0].Rows[0]["itaxrate"].ToString() != "")
                {
                    this.itaxrate = decimal.Parse(ds.Tables[0].Rows[0]["itaxrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csccode"] != null)
                {
                    this.csccode = ds.Tables[0].Rows[0]["csccode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cscname"] != null)
                {
                    this.cscname = ds.Tables[0].Rows[0]["cscname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cauthid"] != null && ds.Tables[0].Rows[0]["cauthid"].ToString() != "")
                {
                    this.cauthid = int.Parse(ds.Tables[0].Rows[0]["cauthid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine1"] != null)
                {
                    this.cvendefine1 = ds.Tables[0].Rows[0]["cvendefine1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine2"] != null)
                {
                    this.cvendefine2 = ds.Tables[0].Rows[0]["cvendefine2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine3"] != null)
                {
                    this.cvendefine3 = ds.Tables[0].Rows[0]["cvendefine3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine4"] != null)
                {
                    this.cvendefine4 = ds.Tables[0].Rows[0]["cvendefine4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine5"] != null)
                {
                    this.cvendefine5 = ds.Tables[0].Rows[0]["cvendefine5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine6"] != null)
                {
                    this.cvendefine6 = ds.Tables[0].Rows[0]["cvendefine6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine7"] != null)
                {
                    this.cvendefine7 = ds.Tables[0].Rows[0]["cvendefine7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine8"] != null)
                {
                    this.cvendefine8 = ds.Tables[0].Rows[0]["cvendefine8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine9"] != null)
                {
                    this.cvendefine9 = ds.Tables[0].Rows[0]["cvendefine9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine10"] != null)
                {
                    this.cvendefine10 = ds.Tables[0].Rows[0]["cvendefine10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine11"] != null && ds.Tables[0].Rows[0]["cvendefine11"].ToString() != "")
                {
                    this.cvendefine11 = int.Parse(ds.Tables[0].Rows[0]["cvendefine11"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine12"] != null && ds.Tables[0].Rows[0]["cvendefine12"].ToString() != "")
                {
                    this.cvendefine12 = int.Parse(ds.Tables[0].Rows[0]["cvendefine12"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine13"] != null && ds.Tables[0].Rows[0]["cvendefine13"].ToString() != "")
                {
                    this.cvendefine13 = decimal.Parse(ds.Tables[0].Rows[0]["cvendefine13"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine14"] != null && ds.Tables[0].Rows[0]["cvendefine14"].ToString() != "")
                {
                    this.cvendefine14 = decimal.Parse(ds.Tables[0].Rows[0]["cvendefine14"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine15"] != null && ds.Tables[0].Rows[0]["cvendefine15"].ToString() != "")
                {
                    this.cvendefine15 = DateTime.Parse(ds.Tables[0].Rows[0]["cvendefine15"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine16"] != null && ds.Tables[0].Rows[0]["cvendefine16"].ToString() != "")
                {
                    this.cvendefine16 = DateTime.Parse(ds.Tables[0].Rows[0]["cvendefine16"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ibilltype"] != null && ds.Tables[0].Rows[0]["ibilltype"].ToString() != "")
                {
                    this.ibilltype = int.Parse(ds.Tables[0].Rows[0]["ibilltype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvouchtype"] != null)
                {
                    this.cvouchtype = ds.Tables[0].Rows[0]["cvouchtype"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cmaketime"] != null && ds.Tables[0].Rows[0]["cmaketime"].ToString() != "")
                {
                    this.cmaketime = DateTime.Parse(ds.Tables[0].Rows[0]["cmaketime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmodifytime"] != null && ds.Tables[0].Rows[0]["cmodifytime"].ToString() != "")
                {
                    this.cmodifytime = DateTime.Parse(ds.Tables[0].Rows[0]["cmodifytime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmodifydate"] != null && ds.Tables[0].Rows[0]["cmodifydate"].ToString() != "")
                {
                    this.cmodifydate = DateTime.Parse(ds.Tables[0].Rows[0]["cmodifydate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["creviser"] != null)
                {
                    this.creviser = ds.Tables[0].Rows[0]["creviser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cauditdate"] != null && ds.Tables[0].Rows[0]["cauditdate"].ToString() != "")
                {
                    this.cauditdate = DateTime.Parse(ds.Tables[0].Rows[0]["cauditdate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["caudittime"] != null && ds.Tables[0].Rows[0]["caudittime"].ToString() != "")
                {
                    this.caudittime = DateTime.Parse(ds.Tables[0].Rows[0]["caudittime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cverifier"] != null)
                {
                    this.cverifier = ds.Tables[0].Rows[0]["cverifier"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iverifystateex"] != null && ds.Tables[0].Rows[0]["iverifystateex"].ToString() != "")
                {
                    this.iverifystateex = int.Parse(ds.Tables[0].Rows[0]["iverifystateex"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ireturncount"] != null && ds.Tables[0].Rows[0]["ireturncount"].ToString() != "")
                {
                    this.ireturncount = int.Parse(ds.Tables[0].Rows[0]["ireturncount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iswfcontrolled"] != null && ds.Tables[0].Rows[0]["iswfcontrolled"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["iswfcontrolled"].ToString() == "1") || (ds.Tables[0].Rows[0]["iswfcontrolled"].ToString().ToLower() == "true"))
                    {
                        this.iswfcontrolled = true;
                    }
                    else
                    {
                        this.iswfcontrolled = false;
                    }
                }

                if (ds.Tables[0].Rows[0]["cvenpuomprotocol"] != null)
                {
                    this.cvenpuomprotocol = ds.Tables[0].Rows[0]["cvenpuomprotocol"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvenpuomprotocolname"] != null)
                {
                    this.cvenpuomprotocolname = ds.Tables[0].Rows[0]["cvenpuomprotocolname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cchanger"] != null)
                {
                    this.cchanger = ds.Tables[0].Rows[0]["cchanger"].ToString();
                }
                if (ds.Tables[0].Rows[0]["dclosedate"] != null && ds.Tables[0].Rows[0]["dclosedate"].ToString() != "")
                {
                    this.dclosedate = DateTime.Parse(ds.Tables[0].Rows[0]["dclosedate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvoucherstate"] != null)
                {
                    this.cvoucherstate = ds.Tables[0].Rows[0]["cvoucherstate"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iflowid"] != null && ds.Tables[0].Rows[0]["iflowid"].ToString() != "")
                {
                    this.iflowid = int.Parse(ds.Tables[0].Rows[0]["iflowid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cflowname"] != null)
                {
                    this.cflowname = ds.Tables[0].Rows[0]["cflowname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bflowprocess"] != null && ds.Tables[0].Rows[0]["bflowprocess"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["bflowprocess"].ToString() == "1") || (ds.Tables[0].Rows[0]["bflowprocess"].ToString().ToLower() == "true"))
                    {
                        this.bflowprocess = true;
                    }
                    else
                    {
                        this.bflowprocess = false;
                    }
                }

                if (ds.Tables[0].Rows[0]["bstoragearrivalorder"] != null && ds.Tables[0].Rows[0]["bstoragearrivalorder"].ToString() != "")
                {
                    this.bstoragearrivalorder = int.Parse(ds.Tables[0].Rows[0]["bstoragearrivalorder"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iprintcount"] != null && ds.Tables[0].Rows[0]["iprintcount"].ToString() != "")
                {
                    this.iprintcount = int.Parse(ds.Tables[0].Rows[0]["iprintcount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csysbarcode"] != null)
                {
                    this.csysbarcode = ds.Tables[0].Rows[0]["csysbarcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ccurrentauditor"] != null)
                {
                    this.ccurrentauditor = ds.Tables[0].Rows[0]["ccurrentauditor"].ToString();
                }
            }
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int ivtid, string ufts, DateTime ddate, int id, string ccode, string cptcode, string cptname, string cvencode, string cvenabbname, string cvenname, string cdepcode, string cdepname, string cpocode, string cpersoncode, string cpersonname, string cpaycode, string cpayname, string cexch_name, string cexch_code, decimal iexchrate, string cmemo, string cbustype, string cmaker, int bnegative, string ccloser, int idiscounttaxtype, string cdefine1, string cdefine2, string cdefine3, DateTime cdefine4, int cdefine5, DateTime cdefine6, decimal cdefine7, string cdefine8, string cdefine9, string cdefine10, string cdefine11, string cdefine12, string cdefine13, string cdefine14, int cdefine15, decimal cdefine16, decimal itaxrate, string csccode, string cscname, int cauthid, string cvendefine1, string cvendefine2, string cvendefine3, string cvendefine4, string cvendefine5, string cvendefine6, string cvendefine7, string cvendefine8, string cvendefine9, string cvendefine10, int cvendefine11, int cvendefine12, decimal cvendefine13, decimal cvendefine14, DateTime cvendefine15, DateTime cvendefine16, int ibilltype, string cvouchtype, DateTime cmaketime, DateTime cmodifytime, DateTime cmodifydate, string creviser, DateTime cauditdate, DateTime caudittime, string cverifier, int iverifystateex, int ireturncount, bool iswfcontrolled, string cvenpuomprotocol, string cvenpuomprotocolname, string cchanger, DateTime dclosedate, string cvoucherstate, int iflowid, string cflowname, bool bflowprocess, int bstoragearrivalorder, int iprintcount, string csysbarcode, string ccurrentauditor)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from [pu_ArrHead]");
            strSql.Append(" where ivtid=@ivtid and ufts=@ufts and ddate=@ddate and id=@id and ccode=@ccode and cptcode=@cptcode and cptname=@cptname and cvencode=@cvencode and cvenabbname=@cvenabbname and cvenname=@cvenname and cdepcode=@cdepcode and cdepname=@cdepname and cpocode=@cpocode and cpersoncode=@cpersoncode and cpersonname=@cpersonname and cpaycode=@cpaycode and cpayname=@cpayname and cexch_name=@cexch_name and cexch_code=@cexch_code and iexchrate=@iexchrate and cmemo=@cmemo and cbustype=@cbustype and cmaker=@cmaker and bnegative=@bnegative and ccloser=@ccloser and idiscounttaxtype=@idiscounttaxtype and cdefine1=@cdefine1 and cdefine2=@cdefine2 and cdefine3=@cdefine3 and cdefine4=@cdefine4 and cdefine5=@cdefine5 and cdefine6=@cdefine6 and cdefine7=@cdefine7 and cdefine8=@cdefine8 and cdefine9=@cdefine9 and cdefine10=@cdefine10 and cdefine11=@cdefine11 and cdefine12=@cdefine12 and cdefine13=@cdefine13 and cdefine14=@cdefine14 and cdefine15=@cdefine15 and cdefine16=@cdefine16 and itaxrate=@itaxrate and csccode=@csccode and cscname=@cscname and cauthid=@cauthid and cvendefine1=@cvendefine1 and cvendefine2=@cvendefine2 and cvendefine3=@cvendefine3 and cvendefine4=@cvendefine4 and cvendefine5=@cvendefine5 and cvendefine6=@cvendefine6 and cvendefine7=@cvendefine7 and cvendefine8=@cvendefine8 and cvendefine9=@cvendefine9 and cvendefine10=@cvendefine10 and cvendefine11=@cvendefine11 and cvendefine12=@cvendefine12 and cvendefine13=@cvendefine13 and cvendefine14=@cvendefine14 and cvendefine15=@cvendefine15 and cvendefine16=@cvendefine16 and ibilltype=@ibilltype and cvouchtype=@cvouchtype and cmaketime=@cmaketime and cmodifytime=@cmodifytime and cmodifydate=@cmodifydate and creviser=@creviser and cauditdate=@cauditdate and caudittime=@caudittime and cverifier=@cverifier and iverifystateex=@iverifystateex and ireturncount=@ireturncount and iswfcontrolled=@iswfcontrolled and cvenpuomprotocol=@cvenpuomprotocol and cvenpuomprotocolname=@cvenpuomprotocolname and cchanger=@cchanger and dclosedate=@dclosedate and cvoucherstate=@cvoucherstate and iflowid=@iflowid and cflowname=@cflowname and bflowprocess=@bflowprocess and bstoragearrivalorder=@bstoragearrivalorder and iprintcount=@iprintcount and csysbarcode=@csysbarcode and ccurrentauditor=@ccurrentauditor ");

            SqlParameter[] parameters = {
                    new SqlParameter("@ivtid", SqlDbType.Int,4),
                    new SqlParameter("@ufts", SqlDbType.Char,10),
                    new SqlParameter("@ddate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@ccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvencode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenabbname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersoncode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersonname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpaycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpayname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_code", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iexchrate", SqlDbType.Float),
                    new SqlParameter("@cmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbustype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaker", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bnegative", SqlDbType.Int,4),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@idiscounttaxtype", SqlDbType.TinyInt),
                    new SqlParameter("@cdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine4", SqlDbType.DateTime),
                    new SqlParameter("@cdefine5", SqlDbType.Int,4),
                    new SqlParameter("@cdefine6", SqlDbType.DateTime),
                    new SqlParameter("@cdefine7", SqlDbType.Float),
                    new SqlParameter("@cdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine11", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine12", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine13", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine14", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine15", SqlDbType.Int,4),
                    new SqlParameter("@cdefine16", SqlDbType.Float),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@csccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cscname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauthid", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine11", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine12", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine13", SqlDbType.Float),
                    new SqlParameter("@cvendefine14", SqlDbType.Float),
                    new SqlParameter("@cvendefine15", SqlDbType.DateTime),
                    new SqlParameter("@cvendefine16", SqlDbType.DateTime),
                    new SqlParameter("@ibilltype", SqlDbType.TinyInt),
                    new SqlParameter("@cvouchtype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaketime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifytime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifydate", SqlDbType.DateTime),
                    new SqlParameter("@creviser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauditdate", SqlDbType.DateTime),
                    new SqlParameter("@caudittime", SqlDbType.DateTime),
                    new SqlParameter("@cverifier", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iverifystateex", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.Int,4),
                    new SqlParameter("@iswfcontrolled", SqlDbType.Bit,1),
                    new SqlParameter("@cvenpuomprotocol", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenpuomprotocolname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cchanger", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cvoucherstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@cflowname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bflowprocess", SqlDbType.Bit,1),
                    new SqlParameter("@bstoragearrivalorder", SqlDbType.Int,4),
                    new SqlParameter("@iprintcount", SqlDbType.Int,4),
                    new SqlParameter("@csysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccurrentauditor", SqlDbType.NVarChar,-1)};
            parameters[0].Value = ivtid;
            parameters[1].Value = ufts;
            parameters[2].Value = ddate;
            parameters[3].Value = id;
            parameters[4].Value = ccode;
            parameters[5].Value = cptcode;
            parameters[6].Value = cptname;
            parameters[7].Value = cvencode;
            parameters[8].Value = cvenabbname;
            parameters[9].Value = cvenname;
            parameters[10].Value = cdepcode;
            parameters[11].Value = cdepname;
            parameters[12].Value = cpocode;
            parameters[13].Value = cpersoncode;
            parameters[14].Value = cpersonname;
            parameters[15].Value = cpaycode;
            parameters[16].Value = cpayname;
            parameters[17].Value = cexch_name;
            parameters[18].Value = cexch_code;
            parameters[19].Value = iexchrate;
            parameters[20].Value = cmemo;
            parameters[21].Value = cbustype;
            parameters[22].Value = cmaker;
            parameters[23].Value = bnegative;
            parameters[24].Value = ccloser;
            parameters[25].Value = idiscounttaxtype;
            parameters[26].Value = cdefine1;
            parameters[27].Value = cdefine2;
            parameters[28].Value = cdefine3;
            parameters[29].Value = cdefine4;
            parameters[30].Value = cdefine5;
            parameters[31].Value = cdefine6;
            parameters[32].Value = cdefine7;
            parameters[33].Value = cdefine8;
            parameters[34].Value = cdefine9;
            parameters[35].Value = cdefine10;
            parameters[36].Value = cdefine11;
            parameters[37].Value = cdefine12;
            parameters[38].Value = cdefine13;
            parameters[39].Value = cdefine14;
            parameters[40].Value = cdefine15;
            parameters[41].Value = cdefine16;
            parameters[42].Value = itaxrate;
            parameters[43].Value = csccode;
            parameters[44].Value = cscname;
            parameters[45].Value = cauthid;
            parameters[46].Value = cvendefine1;
            parameters[47].Value = cvendefine2;
            parameters[48].Value = cvendefine3;
            parameters[49].Value = cvendefine4;
            parameters[50].Value = cvendefine5;
            parameters[51].Value = cvendefine6;
            parameters[52].Value = cvendefine7;
            parameters[53].Value = cvendefine8;
            parameters[54].Value = cvendefine9;
            parameters[55].Value = cvendefine10;
            parameters[56].Value = cvendefine11;
            parameters[57].Value = cvendefine12;
            parameters[58].Value = cvendefine13;
            parameters[59].Value = cvendefine14;
            parameters[60].Value = cvendefine15;
            parameters[61].Value = cvendefine16;
            parameters[62].Value = ibilltype;
            parameters[63].Value = cvouchtype;
            parameters[64].Value = cmaketime;
            parameters[65].Value = cmodifytime;
            parameters[66].Value = cmodifydate;
            parameters[67].Value = creviser;
            parameters[68].Value = cauditdate;
            parameters[69].Value = caudittime;
            parameters[70].Value = cverifier;
            parameters[71].Value = iverifystateex;
            parameters[72].Value = ireturncount;
            parameters[73].Value = iswfcontrolled;
            parameters[74].Value = cvenpuomprotocol;
            parameters[75].Value = cvenpuomprotocolname;
            parameters[76].Value = cchanger;
            parameters[77].Value = dclosedate;
            parameters[78].Value = cvoucherstate;
            parameters[79].Value = iflowid;
            parameters[80].Value = cflowname;
            parameters[81].Value = bflowprocess;
            parameters[82].Value = bstoragearrivalorder;
            parameters[83].Value = iprintcount;
            parameters[84].Value = csysbarcode;
            parameters[85].Value = ccurrentauditor;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(string tablename)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into "+tablename+" (");
            strSql.Append("ivtid,ufts,ddate,id,ccode,cptcode,cptname,cvencode,cvenabbname,cvenname,cdepcode,cdepname,cpocode,cpersoncode,cpersonname,cpaycode,cpayname,cexch_name,cexch_code,iexchrate,cmemo,cbustype,cmaker,bnegative,ccloser,idiscounttaxtype,cdefine1,cdefine2,cdefine3,cdefine4,cdefine5,cdefine6,cdefine7,cdefine8,cdefine9,cdefine10,cdefine11,cdefine12,cdefine13,cdefine14,cdefine15,cdefine16,itaxrate,csccode,cscname,cauthid,cvendefine1,cvendefine2,cvendefine3,cvendefine4,cvendefine5,cvendefine6,cvendefine7,cvendefine8,cvendefine9,cvendefine10,cvendefine11,cvendefine12,cvendefine13,cvendefine14,cvendefine15,cvendefine16,ibilltype,cvouchtype,cmaketime,cmodifytime,cmodifydate,creviser,cauditdate,caudittime,cverifier,iverifystateex,ireturncount,iswfcontrolled,cvenpuomprotocol,cvenpuomprotocolname,cchanger,dclosedate,cvoucherstate,iflowid,cflowname,bflowprocess,bstoragearrivalorder,iprintcount,csysbarcode,ccurrentauditor)");
            strSql.Append(" values (");
            strSql.Append("@ivtid,@ufts,@ddate,@id,@ccode,@cptcode,@cptname,@cvencode,@cvenabbname,@cvenname,@cdepcode,@cdepname,@cpocode,@cpersoncode,@cpersonname,@cpaycode,@cpayname,@cexch_name,@cexch_code,@iexchrate,@cmemo,@cbustype,@cmaker,@bnegative,@ccloser,@idiscounttaxtype,@cdefine1,@cdefine2,@cdefine3,@cdefine4,@cdefine5,@cdefine6,@cdefine7,@cdefine8,@cdefine9,@cdefine10,@cdefine11,@cdefine12,@cdefine13,@cdefine14,@cdefine15,@cdefine16,@itaxrate,@csccode,@cscname,@cauthid,@cvendefine1,@cvendefine2,@cvendefine3,@cvendefine4,@cvendefine5,@cvendefine6,@cvendefine7,@cvendefine8,@cvendefine9,@cvendefine10,@cvendefine11,@cvendefine12,@cvendefine13,@cvendefine14,@cvendefine15,@cvendefine16,@ibilltype,@cvouchtype,@cmaketime,@cmodifytime,@cmodifydate,@creviser,@cauditdate,@caudittime,@cverifier,@iverifystateex,@ireturncount,@iswfcontrolled,@cvenpuomprotocol,@cvenpuomprotocolname,@cchanger,@dclosedate,@cvoucherstate,@iflowid,@cflowname,@bflowprocess,@bstoragearrivalorder,@iprintcount,@csysbarcode,@ccurrentauditor)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ivtid", SqlDbType.Int,4),
                    new SqlParameter("@ufts", SqlDbType.Char,30),
                    new SqlParameter("@ddate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@ccode", SqlDbType.NVarChar,30),
                    new SqlParameter("@cptcode", SqlDbType.NVarChar,2),
                    new SqlParameter("@cptname", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvencode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvenabbname", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvenname", SqlDbType.NVarChar,98),
                    new SqlParameter("@cdepcode", SqlDbType.NVarChar,12),
                    new SqlParameter("@cdepname", SqlDbType.NVarChar,255),
                    new SqlParameter("@cpocode", SqlDbType.NVarChar,64),
                    new SqlParameter("@cpersoncode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cpersonname", SqlDbType.NVarChar,40),
                    new SqlParameter("@cpaycode", SqlDbType.NVarChar,3),
                    new SqlParameter("@cpayname", SqlDbType.NVarChar,60),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,8),
                    new SqlParameter("@cexch_code", SqlDbType.NVarChar,4),
                    new SqlParameter("@iexchrate", SqlDbType.Float,8),
                    new SqlParameter("@cmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbustype", SqlDbType.NVarChar,8),
                    new SqlParameter("@cmaker", SqlDbType.NVarChar,20),
                    new SqlParameter("@bnegative", SqlDbType.Int,4),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@idiscounttaxtype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cdefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine4", SqlDbType.DateTime),
                    new SqlParameter("@cdefine5", SqlDbType.Int,4),
                    new SqlParameter("@cdefine6", SqlDbType.DateTime),
                    new SqlParameter("@cdefine7", SqlDbType.Float,8),
                    new SqlParameter("@cdefine8", SqlDbType.NVarChar,4),
                    new SqlParameter("@cdefine9", SqlDbType.NVarChar,8),
                    new SqlParameter("@cdefine10", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine11", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine12", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine13", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine14", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine15", SqlDbType.Int,4),
                    new SqlParameter("@cdefine16", SqlDbType.Float,8),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal,13),
                    new SqlParameter("@csccode", SqlDbType.NVarChar,2),
                    new SqlParameter("@cscname", SqlDbType.NVarChar,20),
                    new SqlParameter("@cauthid", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvendefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvendefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvendefine4", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvendefine5", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvendefine6", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvendefine7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine10", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine11", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine12", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine13", SqlDbType.Float,8),
                    new SqlParameter("@cvendefine14", SqlDbType.Float,8),
                    new SqlParameter("@cvendefine15", SqlDbType.DateTime),
                    new SqlParameter("@cvendefine16", SqlDbType.DateTime),
                    new SqlParameter("@ibilltype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cvouchtype", SqlDbType.NVarChar,10),
                    new SqlParameter("@cmaketime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifytime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifydate", SqlDbType.DateTime),
                    new SqlParameter("@creviser", SqlDbType.NVarChar,40),
                    new SqlParameter("@cauditdate", SqlDbType.DateTime),
                    new SqlParameter("@caudittime", SqlDbType.DateTime),
                    new SqlParameter("@cverifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@iverifystateex", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.Int,4),
                    new SqlParameter("@iswfcontrolled", SqlDbType.Bit,1),
                    new SqlParameter("@cvenpuomprotocol", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvenpuomprotocolname", SqlDbType.NVarChar,60),
                    new SqlParameter("@cchanger", SqlDbType.NVarChar,20),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cvoucherstate", SqlDbType.NVarChar,3),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@cflowname", SqlDbType.NVarChar,40),
                    new SqlParameter("@bflowprocess", SqlDbType.Bit,1),
                    new SqlParameter("@bstoragearrivalorder", SqlDbType.Int,4),
                    new SqlParameter("@iprintcount", SqlDbType.Int,4),
                    new SqlParameter("@csysbarcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@ccurrentauditor", SqlDbType.NVarChar,200)};
            parameters[0].Value = ivtid;
            parameters[1].Value = ufts;
            parameters[2].Value = ddate;
            parameters[3].Value = id;
            parameters[4].Value = ccode;
            parameters[5].Value = cptcode;
            parameters[6].Value = cptname;
            parameters[7].Value = cvencode;
            parameters[8].Value = cvenabbname;
            parameters[9].Value = cvenname;
            parameters[10].Value = cdepcode;
            parameters[11].Value = cdepname;
            parameters[12].Value = cpocode;
            parameters[13].Value = cpersoncode;
            parameters[14].Value = cpersonname;
            parameters[15].Value = cpaycode;
            parameters[16].Value = cpayname;
            parameters[17].Value = cexch_name;
            parameters[18].Value = cexch_code;
            parameters[19].Value = iexchrate;
            parameters[20].Value = cmemo;
            parameters[21].Value = cbustype;
            parameters[22].Value = cmaker;
            parameters[23].Value = bnegative;
            parameters[24].Value = ccloser;
            parameters[25].Value = idiscounttaxtype;
            parameters[26].Value = cdefine1;
            parameters[27].Value = cdefine2;
            parameters[28].Value = cdefine3;
            parameters[29].Value = cdefine4;
            parameters[30].Value = cdefine5;
            parameters[31].Value = cdefine6;
            parameters[32].Value = cdefine7;
            parameters[33].Value = cdefine8;
            parameters[34].Value = cdefine9;
            parameters[35].Value = cdefine10;
            parameters[36].Value = cdefine11;
            parameters[37].Value = cdefine12;
            parameters[38].Value = cdefine13;
            parameters[39].Value = cdefine14;
            parameters[40].Value = cdefine15;
            parameters[41].Value = cdefine16;
            parameters[42].Value = itaxrate;
            parameters[43].Value = csccode;
            parameters[44].Value = cscname;
            parameters[45].Value = cauthid;
            parameters[46].Value = cvendefine1;
            parameters[47].Value = cvendefine2;
            parameters[48].Value = cvendefine3;
            parameters[49].Value = cvendefine4;
            parameters[50].Value = cvendefine5;
            parameters[51].Value = cvendefine6;
            parameters[52].Value = cvendefine7;
            parameters[53].Value = cvendefine8;
            parameters[54].Value = cvendefine9;
            parameters[55].Value = cvendefine10;
            parameters[56].Value = cvendefine11;
            parameters[57].Value = cvendefine12;
            parameters[58].Value = cvendefine13;
            parameters[59].Value = cvendefine14;
            parameters[60].Value = cvendefine15;
            parameters[61].Value = cvendefine16;
            parameters[62].Value = ibilltype;
            parameters[63].Value = cvouchtype;
            parameters[64].Value = cmaketime;
            parameters[65].Value = cmodifytime;
            parameters[66].Value = cmodifydate;
            parameters[67].Value = creviser;
            parameters[68].Value = cauditdate;
            parameters[69].Value = caudittime;
            parameters[70].Value = cverifier;
            parameters[71].Value = iverifystateex;
            parameters[72].Value = ireturncount;
            parameters[73].Value = iswfcontrolled;
            parameters[74].Value = cvenpuomprotocol;
            parameters[75].Value = cvenpuomprotocolname;
            parameters[76].Value = cchanger;
            parameters[77].Value = dclosedate;
            parameters[78].Value = cvoucherstate;
            parameters[79].Value = iflowid;
            parameters[80].Value = cflowname;
            parameters[81].Value = bflowprocess;
            parameters[82].Value = bstoragearrivalorder;
            parameters[83].Value = iprintcount;
            parameters[84].Value = csysbarcode;
            parameters[85].Value = ccurrentauditor;

          return  DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update [pu_ArrHead] set ");
            strSql.Append("ivtid=@ivtid,");
            strSql.Append("ufts=@ufts,");
            strSql.Append("ddate=@ddate,");
            strSql.Append("id=@id,");
            strSql.Append("ccode=@ccode,");
            strSql.Append("cptcode=@cptcode,");
            strSql.Append("cptname=@cptname,");
            strSql.Append("cvencode=@cvencode,");
            strSql.Append("cvenabbname=@cvenabbname,");
            strSql.Append("cvenname=@cvenname,");
            strSql.Append("cdepcode=@cdepcode,");
            strSql.Append("cdepname=@cdepname,");
            strSql.Append("cpocode=@cpocode,");
            strSql.Append("cpersoncode=@cpersoncode,");
            strSql.Append("cpersonname=@cpersonname,");
            strSql.Append("cpaycode=@cpaycode,");
            strSql.Append("cpayname=@cpayname,");
            strSql.Append("cexch_name=@cexch_name,");
            strSql.Append("cexch_code=@cexch_code,");
            strSql.Append("iexchrate=@iexchrate,");
            strSql.Append("cmemo=@cmemo,");
            strSql.Append("cbustype=@cbustype,");
            strSql.Append("cmaker=@cmaker,");
            strSql.Append("bnegative=@bnegative,");
            strSql.Append("ccloser=@ccloser,");
            strSql.Append("idiscounttaxtype=@idiscounttaxtype,");
            strSql.Append("cdefine1=@cdefine1,");
            strSql.Append("cdefine2=@cdefine2,");
            strSql.Append("cdefine3=@cdefine3,");
            strSql.Append("cdefine4=@cdefine4,");
            strSql.Append("cdefine5=@cdefine5,");
            strSql.Append("cdefine6=@cdefine6,");
            strSql.Append("cdefine7=@cdefine7,");
            strSql.Append("cdefine8=@cdefine8,");
            strSql.Append("cdefine9=@cdefine9,");
            strSql.Append("cdefine10=@cdefine10,");
            strSql.Append("cdefine11=@cdefine11,");
            strSql.Append("cdefine12=@cdefine12,");
            strSql.Append("cdefine13=@cdefine13,");
            strSql.Append("cdefine14=@cdefine14,");
            strSql.Append("cdefine15=@cdefine15,");
            strSql.Append("cdefine16=@cdefine16,");
            strSql.Append("itaxrate=@itaxrate,");
            strSql.Append("csccode=@csccode,");
            strSql.Append("cscname=@cscname,");
            strSql.Append("cauthid=@cauthid,");
            strSql.Append("cvendefine1=@cvendefine1,");
            strSql.Append("cvendefine2=@cvendefine2,");
            strSql.Append("cvendefine3=@cvendefine3,");
            strSql.Append("cvendefine4=@cvendefine4,");
            strSql.Append("cvendefine5=@cvendefine5,");
            strSql.Append("cvendefine6=@cvendefine6,");
            strSql.Append("cvendefine7=@cvendefine7,");
            strSql.Append("cvendefine8=@cvendefine8,");
            strSql.Append("cvendefine9=@cvendefine9,");
            strSql.Append("cvendefine10=@cvendefine10,");
            strSql.Append("cvendefine11=@cvendefine11,");
            strSql.Append("cvendefine12=@cvendefine12,");
            strSql.Append("cvendefine13=@cvendefine13,");
            strSql.Append("cvendefine14=@cvendefine14,");
            strSql.Append("cvendefine15=@cvendefine15,");
            strSql.Append("cvendefine16=@cvendefine16,");
            strSql.Append("ibilltype=@ibilltype,");
            strSql.Append("cvouchtype=@cvouchtype,");
            strSql.Append("cmaketime=@cmaketime,");
            strSql.Append("cmodifytime=@cmodifytime,");
            strSql.Append("cmodifydate=@cmodifydate,");
            strSql.Append("creviser=@creviser,");
            strSql.Append("cauditdate=@cauditdate,");
            strSql.Append("caudittime=@caudittime,");
            strSql.Append("cverifier=@cverifier,");
            strSql.Append("iverifystateex=@iverifystateex,");
            strSql.Append("ireturncount=@ireturncount,");
            strSql.Append("iswfcontrolled=@iswfcontrolled,");
            strSql.Append("cvenpuomprotocol=@cvenpuomprotocol,");
            strSql.Append("cvenpuomprotocolname=@cvenpuomprotocolname,");
            strSql.Append("cchanger=@cchanger,");
            strSql.Append("dclosedate=@dclosedate,");
            strSql.Append("cvoucherstate=@cvoucherstate,");
            strSql.Append("iflowid=@iflowid,");
            strSql.Append("cflowname=@cflowname,");
            strSql.Append("bflowprocess=@bflowprocess,");
            strSql.Append("bstoragearrivalorder=@bstoragearrivalorder,");
            strSql.Append("iprintcount=@iprintcount,");
            strSql.Append("csysbarcode=@csysbarcode,");
            strSql.Append("ccurrentauditor=@ccurrentauditor");
            strSql.Append(" where ivtid=@ivtid and ufts=@ufts and ddate=@ddate and id=@id and ccode=@ccode and cptcode=@cptcode and cptname=@cptname and cvencode=@cvencode and cvenabbname=@cvenabbname and cvenname=@cvenname and cdepcode=@cdepcode and cdepname=@cdepname and cpocode=@cpocode and cpersoncode=@cpersoncode and cpersonname=@cpersonname and cpaycode=@cpaycode and cpayname=@cpayname and cexch_name=@cexch_name and cexch_code=@cexch_code and iexchrate=@iexchrate and cmemo=@cmemo and cbustype=@cbustype and cmaker=@cmaker and bnegative=@bnegative and ccloser=@ccloser and idiscounttaxtype=@idiscounttaxtype and cdefine1=@cdefine1 and cdefine2=@cdefine2 and cdefine3=@cdefine3 and cdefine4=@cdefine4 and cdefine5=@cdefine5 and cdefine6=@cdefine6 and cdefine7=@cdefine7 and cdefine8=@cdefine8 and cdefine9=@cdefine9 and cdefine10=@cdefine10 and cdefine11=@cdefine11 and cdefine12=@cdefine12 and cdefine13=@cdefine13 and cdefine14=@cdefine14 and cdefine15=@cdefine15 and cdefine16=@cdefine16 and itaxrate=@itaxrate and csccode=@csccode and cscname=@cscname and cauthid=@cauthid and cvendefine1=@cvendefine1 and cvendefine2=@cvendefine2 and cvendefine3=@cvendefine3 and cvendefine4=@cvendefine4 and cvendefine5=@cvendefine5 and cvendefine6=@cvendefine6 and cvendefine7=@cvendefine7 and cvendefine8=@cvendefine8 and cvendefine9=@cvendefine9 and cvendefine10=@cvendefine10 and cvendefine11=@cvendefine11 and cvendefine12=@cvendefine12 and cvendefine13=@cvendefine13 and cvendefine14=@cvendefine14 and cvendefine15=@cvendefine15 and cvendefine16=@cvendefine16 and ibilltype=@ibilltype and cvouchtype=@cvouchtype and cmaketime=@cmaketime and cmodifytime=@cmodifytime and cmodifydate=@cmodifydate and creviser=@creviser and cauditdate=@cauditdate and caudittime=@caudittime and cverifier=@cverifier and iverifystateex=@iverifystateex and ireturncount=@ireturncount and iswfcontrolled=@iswfcontrolled and cvenpuomprotocol=@cvenpuomprotocol and cvenpuomprotocolname=@cvenpuomprotocolname and cchanger=@cchanger and dclosedate=@dclosedate and cvoucherstate=@cvoucherstate and iflowid=@iflowid and cflowname=@cflowname and bflowprocess=@bflowprocess and bstoragearrivalorder=@bstoragearrivalorder and iprintcount=@iprintcount and csysbarcode=@csysbarcode and ccurrentauditor=@ccurrentauditor ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ivtid", SqlDbType.Int,4),
                    new SqlParameter("@ufts", SqlDbType.Char,30),
                    new SqlParameter("@ddate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@ccode", SqlDbType.NVarChar,30),
                    new SqlParameter("@cptcode", SqlDbType.NVarChar,2),
                    new SqlParameter("@cptname", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvencode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvenabbname", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvenname", SqlDbType.NVarChar,98),
                    new SqlParameter("@cdepcode", SqlDbType.NVarChar,12),
                    new SqlParameter("@cdepname", SqlDbType.NVarChar,255),
                    new SqlParameter("@cpocode", SqlDbType.NVarChar,64),
                    new SqlParameter("@cpersoncode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cpersonname", SqlDbType.NVarChar,40),
                    new SqlParameter("@cpaycode", SqlDbType.NVarChar,3),
                    new SqlParameter("@cpayname", SqlDbType.NVarChar,60),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,8),
                    new SqlParameter("@cexch_code", SqlDbType.NVarChar,4),
                    new SqlParameter("@iexchrate", SqlDbType.Float,8),
                    new SqlParameter("@cmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbustype", SqlDbType.NVarChar,8),
                    new SqlParameter("@cmaker", SqlDbType.NVarChar,20),
                    new SqlParameter("@bnegative", SqlDbType.Int,4),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@idiscounttaxtype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cdefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine4", SqlDbType.DateTime),
                    new SqlParameter("@cdefine5", SqlDbType.Int,4),
                    new SqlParameter("@cdefine6", SqlDbType.DateTime),
                    new SqlParameter("@cdefine7", SqlDbType.Float,8),
                    new SqlParameter("@cdefine8", SqlDbType.NVarChar,4),
                    new SqlParameter("@cdefine9", SqlDbType.NVarChar,8),
                    new SqlParameter("@cdefine10", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine11", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine12", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine13", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine14", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine15", SqlDbType.Int,4),
                    new SqlParameter("@cdefine16", SqlDbType.Float,8),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal,13),
                    new SqlParameter("@csccode", SqlDbType.NVarChar,2),
                    new SqlParameter("@cscname", SqlDbType.NVarChar,20),
                    new SqlParameter("@cauthid", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvendefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvendefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvendefine4", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvendefine5", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvendefine6", SqlDbType.NVarChar,60),
                    new SqlParameter("@cvendefine7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine10", SqlDbType.NVarChar,120),
                    new SqlParameter("@cvendefine11", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine12", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine13", SqlDbType.Float,8),
                    new SqlParameter("@cvendefine14", SqlDbType.Float,8),
                    new SqlParameter("@cvendefine15", SqlDbType.DateTime),
                    new SqlParameter("@cvendefine16", SqlDbType.DateTime),
                    new SqlParameter("@ibilltype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cvouchtype", SqlDbType.NVarChar,10),
                    new SqlParameter("@cmaketime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifytime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifydate", SqlDbType.DateTime),
                    new SqlParameter("@creviser", SqlDbType.NVarChar,40),
                    new SqlParameter("@cauditdate", SqlDbType.DateTime),
                    new SqlParameter("@caudittime", SqlDbType.DateTime),
                    new SqlParameter("@cverifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@iverifystateex", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.Int,4),
                    new SqlParameter("@iswfcontrolled", SqlDbType.Bit,1),
                    new SqlParameter("@cvenpuomprotocol", SqlDbType.NVarChar,20),
                    new SqlParameter("@cvenpuomprotocolname", SqlDbType.NVarChar,60),
                    new SqlParameter("@cchanger", SqlDbType.NVarChar,20),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cvoucherstate", SqlDbType.NVarChar,3),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@cflowname", SqlDbType.NVarChar,40),
                    new SqlParameter("@bflowprocess", SqlDbType.Bit,1),
                    new SqlParameter("@bstoragearrivalorder", SqlDbType.Int,4),
                    new SqlParameter("@iprintcount", SqlDbType.Int,4),
                    new SqlParameter("@csysbarcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@ccurrentauditor", SqlDbType.NVarChar,200)};
            parameters[0].Value = ivtid;
            parameters[1].Value = ufts;
            parameters[2].Value = ddate;
            parameters[3].Value = id;
            parameters[4].Value = ccode;
            parameters[5].Value = cptcode;
            parameters[6].Value = cptname;
            parameters[7].Value = cvencode;
            parameters[8].Value = cvenabbname;
            parameters[9].Value = cvenname;
            parameters[10].Value = cdepcode;
            parameters[11].Value = cdepname;
            parameters[12].Value = cpocode;
            parameters[13].Value = cpersoncode;
            parameters[14].Value = cpersonname;
            parameters[15].Value = cpaycode;
            parameters[16].Value = cpayname;
            parameters[17].Value = cexch_name;
            parameters[18].Value = cexch_code;
            parameters[19].Value = iexchrate;
            parameters[20].Value = cmemo;
            parameters[21].Value = cbustype;
            parameters[22].Value = cmaker;
            parameters[23].Value = bnegative;
            parameters[24].Value = ccloser;
            parameters[25].Value = idiscounttaxtype;
            parameters[26].Value = cdefine1;
            parameters[27].Value = cdefine2;
            parameters[28].Value = cdefine3;
            parameters[29].Value = cdefine4;
            parameters[30].Value = cdefine5;
            parameters[31].Value = cdefine6;
            parameters[32].Value = cdefine7;
            parameters[33].Value = cdefine8;
            parameters[34].Value = cdefine9;
            parameters[35].Value = cdefine10;
            parameters[36].Value = cdefine11;
            parameters[37].Value = cdefine12;
            parameters[38].Value = cdefine13;
            parameters[39].Value = cdefine14;
            parameters[40].Value = cdefine15;
            parameters[41].Value = cdefine16;
            parameters[42].Value = itaxrate;
            parameters[43].Value = csccode;
            parameters[44].Value = cscname;
            parameters[45].Value = cauthid;
            parameters[46].Value = cvendefine1;
            parameters[47].Value = cvendefine2;
            parameters[48].Value = cvendefine3;
            parameters[49].Value = cvendefine4;
            parameters[50].Value = cvendefine5;
            parameters[51].Value = cvendefine6;
            parameters[52].Value = cvendefine7;
            parameters[53].Value = cvendefine8;
            parameters[54].Value = cvendefine9;
            parameters[55].Value = cvendefine10;
            parameters[56].Value = cvendefine11;
            parameters[57].Value = cvendefine12;
            parameters[58].Value = cvendefine13;
            parameters[59].Value = cvendefine14;
            parameters[60].Value = cvendefine15;
            parameters[61].Value = cvendefine16;
            parameters[62].Value = ibilltype;
            parameters[63].Value = cvouchtype;
            parameters[64].Value = cmaketime;
            parameters[65].Value = cmodifytime;
            parameters[66].Value = cmodifydate;
            parameters[67].Value = creviser;
            parameters[68].Value = cauditdate;
            parameters[69].Value = caudittime;
            parameters[70].Value = cverifier;
            parameters[71].Value = iverifystateex;
            parameters[72].Value = ireturncount;
            parameters[73].Value = iswfcontrolled;
            parameters[74].Value = cvenpuomprotocol;
            parameters[75].Value = cvenpuomprotocolname;
            parameters[76].Value = cchanger;
            parameters[77].Value = dclosedate;
            parameters[78].Value = cvoucherstate;
            parameters[79].Value = iflowid;
            parameters[80].Value = cflowname;
            parameters[81].Value = bflowprocess;
            parameters[82].Value = bstoragearrivalorder;
            parameters[83].Value = iprintcount;
            parameters[84].Value = csysbarcode;
            parameters[85].Value = ccurrentauditor;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ivtid, string ufts, DateTime ddate, int id, string ccode, string cptcode, string cptname, string cvencode, string cvenabbname, string cvenname, string cdepcode, string cdepname, string cpocode, string cpersoncode, string cpersonname, string cpaycode, string cpayname, string cexch_name, string cexch_code, decimal iexchrate, string cmemo, string cbustype, string cmaker, int bnegative, string ccloser, int idiscounttaxtype, string cdefine1, string cdefine2, string cdefine3, DateTime cdefine4, int cdefine5, DateTime cdefine6, decimal cdefine7, string cdefine8, string cdefine9, string cdefine10, string cdefine11, string cdefine12, string cdefine13, string cdefine14, int cdefine15, decimal cdefine16, decimal itaxrate, string csccode, string cscname, int cauthid, string cvendefine1, string cvendefine2, string cvendefine3, string cvendefine4, string cvendefine5, string cvendefine6, string cvendefine7, string cvendefine8, string cvendefine9, string cvendefine10, int cvendefine11, int cvendefine12, decimal cvendefine13, decimal cvendefine14, DateTime cvendefine15, DateTime cvendefine16, int ibilltype, string cvouchtype, DateTime cmaketime, DateTime cmodifytime, DateTime cmodifydate, string creviser, DateTime cauditdate, DateTime caudittime, string cverifier, int iverifystateex, int ireturncount, bool iswfcontrolled, string cvenpuomprotocol, string cvenpuomprotocolname, string cchanger, DateTime dclosedate, string cvoucherstate, int iflowid, string cflowname, bool bflowprocess, int bstoragearrivalorder, int iprintcount, string csysbarcode, string ccurrentauditor)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from [pu_ArrHead] ");
            strSql.Append(" where ivtid=@ivtid and ufts=@ufts and ddate=@ddate and id=@id and ccode=@ccode and cptcode=@cptcode and cptname=@cptname and cvencode=@cvencode and cvenabbname=@cvenabbname and cvenname=@cvenname and cdepcode=@cdepcode and cdepname=@cdepname and cpocode=@cpocode and cpersoncode=@cpersoncode and cpersonname=@cpersonname and cpaycode=@cpaycode and cpayname=@cpayname and cexch_name=@cexch_name and cexch_code=@cexch_code and iexchrate=@iexchrate and cmemo=@cmemo and cbustype=@cbustype and cmaker=@cmaker and bnegative=@bnegative and ccloser=@ccloser and idiscounttaxtype=@idiscounttaxtype and cdefine1=@cdefine1 and cdefine2=@cdefine2 and cdefine3=@cdefine3 and cdefine4=@cdefine4 and cdefine5=@cdefine5 and cdefine6=@cdefine6 and cdefine7=@cdefine7 and cdefine8=@cdefine8 and cdefine9=@cdefine9 and cdefine10=@cdefine10 and cdefine11=@cdefine11 and cdefine12=@cdefine12 and cdefine13=@cdefine13 and cdefine14=@cdefine14 and cdefine15=@cdefine15 and cdefine16=@cdefine16 and itaxrate=@itaxrate and csccode=@csccode and cscname=@cscname and cauthid=@cauthid and cvendefine1=@cvendefine1 and cvendefine2=@cvendefine2 and cvendefine3=@cvendefine3 and cvendefine4=@cvendefine4 and cvendefine5=@cvendefine5 and cvendefine6=@cvendefine6 and cvendefine7=@cvendefine7 and cvendefine8=@cvendefine8 and cvendefine9=@cvendefine9 and cvendefine10=@cvendefine10 and cvendefine11=@cvendefine11 and cvendefine12=@cvendefine12 and cvendefine13=@cvendefine13 and cvendefine14=@cvendefine14 and cvendefine15=@cvendefine15 and cvendefine16=@cvendefine16 and ibilltype=@ibilltype and cvouchtype=@cvouchtype and cmaketime=@cmaketime and cmodifytime=@cmodifytime and cmodifydate=@cmodifydate and creviser=@creviser and cauditdate=@cauditdate and caudittime=@caudittime and cverifier=@cverifier and iverifystateex=@iverifystateex and ireturncount=@ireturncount and iswfcontrolled=@iswfcontrolled and cvenpuomprotocol=@cvenpuomprotocol and cvenpuomprotocolname=@cvenpuomprotocolname and cchanger=@cchanger and dclosedate=@dclosedate and cvoucherstate=@cvoucherstate and iflowid=@iflowid and cflowname=@cflowname and bflowprocess=@bflowprocess and bstoragearrivalorder=@bstoragearrivalorder and iprintcount=@iprintcount and csysbarcode=@csysbarcode and ccurrentauditor=@ccurrentauditor ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ivtid", SqlDbType.Int,4),
                    new SqlParameter("@ufts", SqlDbType.Char,10),
                    new SqlParameter("@ddate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@ccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvencode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenabbname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersoncode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersonname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpaycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpayname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_code", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iexchrate", SqlDbType.Float),
                    new SqlParameter("@cmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbustype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaker", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bnegative", SqlDbType.Int,4),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@idiscounttaxtype", SqlDbType.TinyInt),
                    new SqlParameter("@cdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine4", SqlDbType.DateTime),
                    new SqlParameter("@cdefine5", SqlDbType.Int,4),
                    new SqlParameter("@cdefine6", SqlDbType.DateTime),
                    new SqlParameter("@cdefine7", SqlDbType.Float),
                    new SqlParameter("@cdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine11", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine12", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine13", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine14", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine15", SqlDbType.Int,4),
                    new SqlParameter("@cdefine16", SqlDbType.Float),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@csccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cscname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauthid", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine11", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine12", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine13", SqlDbType.Float),
                    new SqlParameter("@cvendefine14", SqlDbType.Float),
                    new SqlParameter("@cvendefine15", SqlDbType.DateTime),
                    new SqlParameter("@cvendefine16", SqlDbType.DateTime),
                    new SqlParameter("@ibilltype", SqlDbType.TinyInt),
                    new SqlParameter("@cvouchtype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaketime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifytime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifydate", SqlDbType.DateTime),
                    new SqlParameter("@creviser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauditdate", SqlDbType.DateTime),
                    new SqlParameter("@caudittime", SqlDbType.DateTime),
                    new SqlParameter("@cverifier", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iverifystateex", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.Int,4),
                    new SqlParameter("@iswfcontrolled", SqlDbType.Bit,1),
                    new SqlParameter("@cvenpuomprotocol", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenpuomprotocolname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cchanger", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cvoucherstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@cflowname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bflowprocess", SqlDbType.Bit,1),
                    new SqlParameter("@bstoragearrivalorder", SqlDbType.Int,4),
                    new SqlParameter("@iprintcount", SqlDbType.Int,4),
                    new SqlParameter("@csysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccurrentauditor", SqlDbType.NVarChar,-1)};
            parameters[0].Value = ivtid;
            parameters[1].Value = ufts;
            parameters[2].Value = ddate;
            parameters[3].Value = id;
            parameters[4].Value = ccode;
            parameters[5].Value = cptcode;
            parameters[6].Value = cptname;
            parameters[7].Value = cvencode;
            parameters[8].Value = cvenabbname;
            parameters[9].Value = cvenname;
            parameters[10].Value = cdepcode;
            parameters[11].Value = cdepname;
            parameters[12].Value = cpocode;
            parameters[13].Value = cpersoncode;
            parameters[14].Value = cpersonname;
            parameters[15].Value = cpaycode;
            parameters[16].Value = cpayname;
            parameters[17].Value = cexch_name;
            parameters[18].Value = cexch_code;
            parameters[19].Value = iexchrate;
            parameters[20].Value = cmemo;
            parameters[21].Value = cbustype;
            parameters[22].Value = cmaker;
            parameters[23].Value = bnegative;
            parameters[24].Value = ccloser;
            parameters[25].Value = idiscounttaxtype;
            parameters[26].Value = cdefine1;
            parameters[27].Value = cdefine2;
            parameters[28].Value = cdefine3;
            parameters[29].Value = cdefine4;
            parameters[30].Value = cdefine5;
            parameters[31].Value = cdefine6;
            parameters[32].Value = cdefine7;
            parameters[33].Value = cdefine8;
            parameters[34].Value = cdefine9;
            parameters[35].Value = cdefine10;
            parameters[36].Value = cdefine11;
            parameters[37].Value = cdefine12;
            parameters[38].Value = cdefine13;
            parameters[39].Value = cdefine14;
            parameters[40].Value = cdefine15;
            parameters[41].Value = cdefine16;
            parameters[42].Value = itaxrate;
            parameters[43].Value = csccode;
            parameters[44].Value = cscname;
            parameters[45].Value = cauthid;
            parameters[46].Value = cvendefine1;
            parameters[47].Value = cvendefine2;
            parameters[48].Value = cvendefine3;
            parameters[49].Value = cvendefine4;
            parameters[50].Value = cvendefine5;
            parameters[51].Value = cvendefine6;
            parameters[52].Value = cvendefine7;
            parameters[53].Value = cvendefine8;
            parameters[54].Value = cvendefine9;
            parameters[55].Value = cvendefine10;
            parameters[56].Value = cvendefine11;
            parameters[57].Value = cvendefine12;
            parameters[58].Value = cvendefine13;
            parameters[59].Value = cvendefine14;
            parameters[60].Value = cvendefine15;
            parameters[61].Value = cvendefine16;
            parameters[62].Value = ibilltype;
            parameters[63].Value = cvouchtype;
            parameters[64].Value = cmaketime;
            parameters[65].Value = cmodifytime;
            parameters[66].Value = cmodifydate;
            parameters[67].Value = creviser;
            parameters[68].Value = cauditdate;
            parameters[69].Value = caudittime;
            parameters[70].Value = cverifier;
            parameters[71].Value = iverifystateex;
            parameters[72].Value = ireturncount;
            parameters[73].Value = iswfcontrolled;
            parameters[74].Value = cvenpuomprotocol;
            parameters[75].Value = cvenpuomprotocolname;
            parameters[76].Value = cchanger;
            parameters[77].Value = dclosedate;
            parameters[78].Value = cvoucherstate;
            parameters[79].Value = iflowid;
            parameters[80].Value = cflowname;
            parameters[81].Value = bflowprocess;
            parameters[82].Value = bstoragearrivalorder;
            parameters[83].Value = iprintcount;
            parameters[84].Value = csysbarcode;
            parameters[85].Value = ccurrentauditor;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public void GetModel(int ivtid, string ufts, DateTime ddate, int id, string ccode, string cptcode, string cptname, string cvencode, string cvenabbname, string cvenname, string cdepcode, string cdepname, string cpocode, string cpersoncode, string cpersonname, string cpaycode, string cpayname, string cexch_name, string cexch_code, decimal iexchrate, string cmemo, string cbustype, string cmaker, int bnegative, string ccloser, int idiscounttaxtype, string cdefine1, string cdefine2, string cdefine3, DateTime cdefine4, int cdefine5, DateTime cdefine6, decimal cdefine7, string cdefine8, string cdefine9, string cdefine10, string cdefine11, string cdefine12, string cdefine13, string cdefine14, int cdefine15, decimal cdefine16, decimal itaxrate, string csccode, string cscname, int cauthid, string cvendefine1, string cvendefine2, string cvendefine3, string cvendefine4, string cvendefine5, string cvendefine6, string cvendefine7, string cvendefine8, string cvendefine9, string cvendefine10, int cvendefine11, int cvendefine12, decimal cvendefine13, decimal cvendefine14, DateTime cvendefine15, DateTime cvendefine16, int ibilltype, string cvouchtype, DateTime cmaketime, DateTime cmodifytime, DateTime cmodifydate, string creviser, DateTime cauditdate, DateTime caudittime, string cverifier, int iverifystateex, int ireturncount, bool iswfcontrolled, string cvenpuomprotocol, string cvenpuomprotocolname, string cchanger, DateTime dclosedate, string cvoucherstate, int iflowid, string cflowname, bool bflowprocess, int bstoragearrivalorder, int iprintcount, string csysbarcode, string ccurrentauditor)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ivtid,ufts,ddate,id,ccode,cptcode,cptname,cvencode,cvenabbname,cvenname,cdepcode,cdepname,cpocode,cpersoncode,cpersonname,cpaycode,cpayname,cexch_name,cexch_code,iexchrate,cmemo,cbustype,cmaker,bnegative,ccloser,idiscounttaxtype,cdefine1,cdefine2,cdefine3,cdefine4,cdefine5,cdefine6,cdefine7,cdefine8,cdefine9,cdefine10,cdefine11,cdefine12,cdefine13,cdefine14,cdefine15,cdefine16,itaxrate,csccode,cscname,cauthid,cvendefine1,cvendefine2,cvendefine3,cvendefine4,cvendefine5,cvendefine6,cvendefine7,cvendefine8,cvendefine9,cvendefine10,cvendefine11,cvendefine12,cvendefine13,cvendefine14,cvendefine15,cvendefine16,ibilltype,cvouchtype,cmaketime,cmodifytime,cmodifydate,creviser,cauditdate,caudittime,cverifier,iverifystateex,ireturncount,iswfcontrolled,cvenpuomprotocol,cvenpuomprotocolname,cchanger,dclosedate,cvoucherstate,iflowid,cflowname,bflowprocess,bstoragearrivalorder,iprintcount,csysbarcode,ccurrentauditor ");
            strSql.Append(" FROM [pu_ArrHead] ");
            strSql.Append(" where ivtid=@ivtid and ufts=@ufts and ddate=@ddate and id=@id and ccode=@ccode and cptcode=@cptcode and cptname=@cptname and cvencode=@cvencode and cvenabbname=@cvenabbname and cvenname=@cvenname and cdepcode=@cdepcode and cdepname=@cdepname and cpocode=@cpocode and cpersoncode=@cpersoncode and cpersonname=@cpersonname and cpaycode=@cpaycode and cpayname=@cpayname and cexch_name=@cexch_name and cexch_code=@cexch_code and iexchrate=@iexchrate and cmemo=@cmemo and cbustype=@cbustype and cmaker=@cmaker and bnegative=@bnegative and ccloser=@ccloser and idiscounttaxtype=@idiscounttaxtype and cdefine1=@cdefine1 and cdefine2=@cdefine2 and cdefine3=@cdefine3 and cdefine4=@cdefine4 and cdefine5=@cdefine5 and cdefine6=@cdefine6 and cdefine7=@cdefine7 and cdefine8=@cdefine8 and cdefine9=@cdefine9 and cdefine10=@cdefine10 and cdefine11=@cdefine11 and cdefine12=@cdefine12 and cdefine13=@cdefine13 and cdefine14=@cdefine14 and cdefine15=@cdefine15 and cdefine16=@cdefine16 and itaxrate=@itaxrate and csccode=@csccode and cscname=@cscname and cauthid=@cauthid and cvendefine1=@cvendefine1 and cvendefine2=@cvendefine2 and cvendefine3=@cvendefine3 and cvendefine4=@cvendefine4 and cvendefine5=@cvendefine5 and cvendefine6=@cvendefine6 and cvendefine7=@cvendefine7 and cvendefine8=@cvendefine8 and cvendefine9=@cvendefine9 and cvendefine10=@cvendefine10 and cvendefine11=@cvendefine11 and cvendefine12=@cvendefine12 and cvendefine13=@cvendefine13 and cvendefine14=@cvendefine14 and cvendefine15=@cvendefine15 and cvendefine16=@cvendefine16 and ibilltype=@ibilltype and cvouchtype=@cvouchtype and cmaketime=@cmaketime and cmodifytime=@cmodifytime and cmodifydate=@cmodifydate and creviser=@creviser and cauditdate=@cauditdate and caudittime=@caudittime and cverifier=@cverifier and iverifystateex=@iverifystateex and ireturncount=@ireturncount and iswfcontrolled=@iswfcontrolled and cvenpuomprotocol=@cvenpuomprotocol and cvenpuomprotocolname=@cvenpuomprotocolname and cchanger=@cchanger and dclosedate=@dclosedate and cvoucherstate=@cvoucherstate and iflowid=@iflowid and cflowname=@cflowname and bflowprocess=@bflowprocess and bstoragearrivalorder=@bstoragearrivalorder and iprintcount=@iprintcount and csysbarcode=@csysbarcode and ccurrentauditor=@ccurrentauditor ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ivtid", SqlDbType.Int,4),
                    new SqlParameter("@ufts", SqlDbType.Char,10),
                    new SqlParameter("@ddate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@ccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cptname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvencode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenabbname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdepname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersoncode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpersonname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpaycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cpayname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cexch_code", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iexchrate", SqlDbType.Float),
                    new SqlParameter("@cmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbustype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaker", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bnegative", SqlDbType.Int,4),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@idiscounttaxtype", SqlDbType.TinyInt),
                    new SqlParameter("@cdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine4", SqlDbType.DateTime),
                    new SqlParameter("@cdefine5", SqlDbType.Int,4),
                    new SqlParameter("@cdefine6", SqlDbType.DateTime),
                    new SqlParameter("@cdefine7", SqlDbType.Float),
                    new SqlParameter("@cdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine11", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine12", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine13", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine14", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine15", SqlDbType.Int,4),
                    new SqlParameter("@cdefine16", SqlDbType.Float),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@csccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cscname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauthid", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvendefine11", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine12", SqlDbType.Int,4),
                    new SqlParameter("@cvendefine13", SqlDbType.Float),
                    new SqlParameter("@cvendefine14", SqlDbType.Float),
                    new SqlParameter("@cvendefine15", SqlDbType.DateTime),
                    new SqlParameter("@cvendefine16", SqlDbType.DateTime),
                    new SqlParameter("@ibilltype", SqlDbType.TinyInt),
                    new SqlParameter("@cvouchtype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cmaketime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifytime", SqlDbType.DateTime),
                    new SqlParameter("@cmodifydate", SqlDbType.DateTime),
                    new SqlParameter("@creviser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cauditdate", SqlDbType.DateTime),
                    new SqlParameter("@caudittime", SqlDbType.DateTime),
                    new SqlParameter("@cverifier", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iverifystateex", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.Int,4),
                    new SqlParameter("@iswfcontrolled", SqlDbType.Bit,1),
                    new SqlParameter("@cvenpuomprotocol", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cvenpuomprotocolname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cchanger", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cvoucherstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@cflowname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bflowprocess", SqlDbType.Bit,1),
                    new SqlParameter("@bstoragearrivalorder", SqlDbType.Int,4),
                    new SqlParameter("@iprintcount", SqlDbType.Int,4),
                    new SqlParameter("@csysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccurrentauditor", SqlDbType.NVarChar,-1)};
            parameters[0].Value = ivtid;
            parameters[1].Value = ufts;
            parameters[2].Value = ddate;
            parameters[3].Value = id;
            parameters[4].Value = ccode;
            parameters[5].Value = cptcode;
            parameters[6].Value = cptname;
            parameters[7].Value = cvencode;
            parameters[8].Value = cvenabbname;
            parameters[9].Value = cvenname;
            parameters[10].Value = cdepcode;
            parameters[11].Value = cdepname;
            parameters[12].Value = cpocode;
            parameters[13].Value = cpersoncode;
            parameters[14].Value = cpersonname;
            parameters[15].Value = cpaycode;
            parameters[16].Value = cpayname;
            parameters[17].Value = cexch_name;
            parameters[18].Value = cexch_code;
            parameters[19].Value = iexchrate;
            parameters[20].Value = cmemo;
            parameters[21].Value = cbustype;
            parameters[22].Value = cmaker;
            parameters[23].Value = bnegative;
            parameters[24].Value = ccloser;
            parameters[25].Value = idiscounttaxtype;
            parameters[26].Value = cdefine1;
            parameters[27].Value = cdefine2;
            parameters[28].Value = cdefine3;
            parameters[29].Value = cdefine4;
            parameters[30].Value = cdefine5;
            parameters[31].Value = cdefine6;
            parameters[32].Value = cdefine7;
            parameters[33].Value = cdefine8;
            parameters[34].Value = cdefine9;
            parameters[35].Value = cdefine10;
            parameters[36].Value = cdefine11;
            parameters[37].Value = cdefine12;
            parameters[38].Value = cdefine13;
            parameters[39].Value = cdefine14;
            parameters[40].Value = cdefine15;
            parameters[41].Value = cdefine16;
            parameters[42].Value = itaxrate;
            parameters[43].Value = csccode;
            parameters[44].Value = cscname;
            parameters[45].Value = cauthid;
            parameters[46].Value = cvendefine1;
            parameters[47].Value = cvendefine2;
            parameters[48].Value = cvendefine3;
            parameters[49].Value = cvendefine4;
            parameters[50].Value = cvendefine5;
            parameters[51].Value = cvendefine6;
            parameters[52].Value = cvendefine7;
            parameters[53].Value = cvendefine8;
            parameters[54].Value = cvendefine9;
            parameters[55].Value = cvendefine10;
            parameters[56].Value = cvendefine11;
            parameters[57].Value = cvendefine12;
            parameters[58].Value = cvendefine13;
            parameters[59].Value = cvendefine14;
            parameters[60].Value = cvendefine15;
            parameters[61].Value = cvendefine16;
            parameters[62].Value = ibilltype;
            parameters[63].Value = cvouchtype;
            parameters[64].Value = cmaketime;
            parameters[65].Value = cmodifytime;
            parameters[66].Value = cmodifydate;
            parameters[67].Value = creviser;
            parameters[68].Value = cauditdate;
            parameters[69].Value = caudittime;
            parameters[70].Value = cverifier;
            parameters[71].Value = iverifystateex;
            parameters[72].Value = ireturncount;
            parameters[73].Value = iswfcontrolled;
            parameters[74].Value = cvenpuomprotocol;
            parameters[75].Value = cvenpuomprotocolname;
            parameters[76].Value = cchanger;
            parameters[77].Value = dclosedate;
            parameters[78].Value = cvoucherstate;
            parameters[79].Value = iflowid;
            parameters[80].Value = cflowname;
            parameters[81].Value = bflowprocess;
            parameters[82].Value = bstoragearrivalorder;
            parameters[83].Value = iprintcount;
            parameters[84].Value = csysbarcode;
            parameters[85].Value = ccurrentauditor;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ivtid"] != null && ds.Tables[0].Rows[0]["ivtid"].ToString() != "")
                {
                    this.ivtid = int.Parse(ds.Tables[0].Rows[0]["ivtid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ufts"] != null)
                {
                    this.ufts = ds.Tables[0].Rows[0]["ufts"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ddate"] != null && ds.Tables[0].Rows[0]["ddate"].ToString() != "")
                {
                    this.ddate = DateTime.Parse(ds.Tables[0].Rows[0]["ddate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["id"] != null && ds.Tables[0].Rows[0]["id"].ToString() != "")
                {
                    this.id = int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ccode"] != null)
                {
                    this.ccode = ds.Tables[0].Rows[0]["ccode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cptcode"] != null)
                {
                    this.cptcode = ds.Tables[0].Rows[0]["cptcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cptname"] != null)
                {
                    this.cptname = ds.Tables[0].Rows[0]["cptname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvencode"] != null)
                {
                    this.cvencode = ds.Tables[0].Rows[0]["cvencode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvenabbname"] != null)
                {
                    this.cvenabbname = ds.Tables[0].Rows[0]["cvenabbname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvenname"] != null)
                {
                    this.cvenname = ds.Tables[0].Rows[0]["cvenname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdepcode"] != null)
                {
                    this.cdepcode = ds.Tables[0].Rows[0]["cdepcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdepname"] != null)
                {
                    this.cdepname = ds.Tables[0].Rows[0]["cdepname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpocode"] != null)
                {
                    this.cpocode = ds.Tables[0].Rows[0]["cpocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpersoncode"] != null)
                {
                    this.cpersoncode = ds.Tables[0].Rows[0]["cpersoncode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpersonname"] != null)
                {
                    this.cpersonname = ds.Tables[0].Rows[0]["cpersonname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpaycode"] != null)
                {
                    this.cpaycode = ds.Tables[0].Rows[0]["cpaycode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cpayname"] != null)
                {
                    this.cpayname = ds.Tables[0].Rows[0]["cpayname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cexch_name"] != null)
                {
                    this.cexch_name = ds.Tables[0].Rows[0]["cexch_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cexch_code"] != null)
                {
                    this.cexch_code = ds.Tables[0].Rows[0]["cexch_code"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iexchrate"] != null && ds.Tables[0].Rows[0]["iexchrate"].ToString() != "")
                {
                    this.iexchrate = decimal.Parse(ds.Tables[0].Rows[0]["iexchrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmemo"] != null)
                {
                    this.cmemo = ds.Tables[0].Rows[0]["cmemo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbustype"] != null)
                {
                    this.cbustype = ds.Tables[0].Rows[0]["cbustype"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cmaker"] != null)
                {
                    this.cmaker = ds.Tables[0].Rows[0]["cmaker"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bnegative"] != null && ds.Tables[0].Rows[0]["bnegative"].ToString() != "")
                {
                    this.bnegative = int.Parse(ds.Tables[0].Rows[0]["bnegative"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ccloser"] != null)
                {
                    this.ccloser = ds.Tables[0].Rows[0]["ccloser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["idiscounttaxtype"] != null && ds.Tables[0].Rows[0]["idiscounttaxtype"].ToString() != "")
                {
                    this.idiscounttaxtype = int.Parse(ds.Tables[0].Rows[0]["idiscounttaxtype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine1"] != null)
                {
                    this.cdefine1 = ds.Tables[0].Rows[0]["cdefine1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine2"] != null)
                {
                    this.cdefine2 = ds.Tables[0].Rows[0]["cdefine2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine3"] != null)
                {
                    this.cdefine3 = ds.Tables[0].Rows[0]["cdefine3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine4"] != null && ds.Tables[0].Rows[0]["cdefine4"].ToString() != "")
                {
                    this.cdefine4 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine4"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine5"] != null && ds.Tables[0].Rows[0]["cdefine5"].ToString() != "")
                {
                    this.cdefine5 = int.Parse(ds.Tables[0].Rows[0]["cdefine5"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine6"] != null && ds.Tables[0].Rows[0]["cdefine6"].ToString() != "")
                {
                    this.cdefine6 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine6"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine7"] != null && ds.Tables[0].Rows[0]["cdefine7"].ToString() != "")
                {
                    this.cdefine7 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine7"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine8"] != null)
                {
                    this.cdefine8 = ds.Tables[0].Rows[0]["cdefine8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine9"] != null)
                {
                    this.cdefine9 = ds.Tables[0].Rows[0]["cdefine9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine10"] != null)
                {
                    this.cdefine10 = ds.Tables[0].Rows[0]["cdefine10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine11"] != null)
                {
                    this.cdefine11 = ds.Tables[0].Rows[0]["cdefine11"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine12"] != null)
                {
                    this.cdefine12 = ds.Tables[0].Rows[0]["cdefine12"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine13"] != null)
                {
                    this.cdefine13 = ds.Tables[0].Rows[0]["cdefine13"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine14"] != null)
                {
                    this.cdefine14 = ds.Tables[0].Rows[0]["cdefine14"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine15"] != null && ds.Tables[0].Rows[0]["cdefine15"].ToString() != "")
                {
                    this.cdefine15 = int.Parse(ds.Tables[0].Rows[0]["cdefine15"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine16"] != null && ds.Tables[0].Rows[0]["cdefine16"].ToString() != "")
                {
                    this.cdefine16 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine16"].ToString());
                }
                if (ds.Tables[0].Rows[0]["itaxrate"] != null && ds.Tables[0].Rows[0]["itaxrate"].ToString() != "")
                {
                    this.itaxrate = decimal.Parse(ds.Tables[0].Rows[0]["itaxrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csccode"] != null)
                {
                    this.csccode = ds.Tables[0].Rows[0]["csccode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cscname"] != null)
                {
                    this.cscname = ds.Tables[0].Rows[0]["cscname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cauthid"] != null && ds.Tables[0].Rows[0]["cauthid"].ToString() != "")
                {
                    this.cauthid = int.Parse(ds.Tables[0].Rows[0]["cauthid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine1"] != null)
                {
                    this.cvendefine1 = ds.Tables[0].Rows[0]["cvendefine1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine2"] != null)
                {
                    this.cvendefine2 = ds.Tables[0].Rows[0]["cvendefine2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine3"] != null)
                {
                    this.cvendefine3 = ds.Tables[0].Rows[0]["cvendefine3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine4"] != null)
                {
                    this.cvendefine4 = ds.Tables[0].Rows[0]["cvendefine4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine5"] != null)
                {
                    this.cvendefine5 = ds.Tables[0].Rows[0]["cvendefine5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine6"] != null)
                {
                    this.cvendefine6 = ds.Tables[0].Rows[0]["cvendefine6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine7"] != null)
                {
                    this.cvendefine7 = ds.Tables[0].Rows[0]["cvendefine7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine8"] != null)
                {
                    this.cvendefine8 = ds.Tables[0].Rows[0]["cvendefine8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine9"] != null)
                {
                    this.cvendefine9 = ds.Tables[0].Rows[0]["cvendefine9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine10"] != null)
                {
                    this.cvendefine10 = ds.Tables[0].Rows[0]["cvendefine10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvendefine11"] != null && ds.Tables[0].Rows[0]["cvendefine11"].ToString() != "")
                {
                    this.cvendefine11 = int.Parse(ds.Tables[0].Rows[0]["cvendefine11"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine12"] != null && ds.Tables[0].Rows[0]["cvendefine12"].ToString() != "")
                {
                    this.cvendefine12 = int.Parse(ds.Tables[0].Rows[0]["cvendefine12"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine13"] != null && ds.Tables[0].Rows[0]["cvendefine13"].ToString() != "")
                {
                    this.cvendefine13 = decimal.Parse(ds.Tables[0].Rows[0]["cvendefine13"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine14"] != null && ds.Tables[0].Rows[0]["cvendefine14"].ToString() != "")
                {
                    this.cvendefine14 = decimal.Parse(ds.Tables[0].Rows[0]["cvendefine14"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine15"] != null && ds.Tables[0].Rows[0]["cvendefine15"].ToString() != "")
                {
                    this.cvendefine15 = DateTime.Parse(ds.Tables[0].Rows[0]["cvendefine15"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvendefine16"] != null && ds.Tables[0].Rows[0]["cvendefine16"].ToString() != "")
                {
                    this.cvendefine16 = DateTime.Parse(ds.Tables[0].Rows[0]["cvendefine16"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ibilltype"] != null && ds.Tables[0].Rows[0]["ibilltype"].ToString() != "")
                {
                    this.ibilltype = int.Parse(ds.Tables[0].Rows[0]["ibilltype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvouchtype"] != null)
                {
                    this.cvouchtype = ds.Tables[0].Rows[0]["cvouchtype"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cmaketime"] != null && ds.Tables[0].Rows[0]["cmaketime"].ToString() != "")
                {
                    this.cmaketime = DateTime.Parse(ds.Tables[0].Rows[0]["cmaketime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmodifytime"] != null && ds.Tables[0].Rows[0]["cmodifytime"].ToString() != "")
                {
                    this.cmodifytime = DateTime.Parse(ds.Tables[0].Rows[0]["cmodifytime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmodifydate"] != null && ds.Tables[0].Rows[0]["cmodifydate"].ToString() != "")
                {
                    this.cmodifydate = DateTime.Parse(ds.Tables[0].Rows[0]["cmodifydate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["creviser"] != null)
                {
                    this.creviser = ds.Tables[0].Rows[0]["creviser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cauditdate"] != null && ds.Tables[0].Rows[0]["cauditdate"].ToString() != "")
                {
                    this.cauditdate = DateTime.Parse(ds.Tables[0].Rows[0]["cauditdate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["caudittime"] != null && ds.Tables[0].Rows[0]["caudittime"].ToString() != "")
                {
                    this.caudittime = DateTime.Parse(ds.Tables[0].Rows[0]["caudittime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cverifier"] != null)
                {
                    this.cverifier = ds.Tables[0].Rows[0]["cverifier"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iverifystateex"] != null && ds.Tables[0].Rows[0]["iverifystateex"].ToString() != "")
                {
                    this.iverifystateex = int.Parse(ds.Tables[0].Rows[0]["iverifystateex"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ireturncount"] != null && ds.Tables[0].Rows[0]["ireturncount"].ToString() != "")
                {
                    this.ireturncount = int.Parse(ds.Tables[0].Rows[0]["ireturncount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iswfcontrolled"] != null && ds.Tables[0].Rows[0]["iswfcontrolled"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["iswfcontrolled"].ToString() == "1") || (ds.Tables[0].Rows[0]["iswfcontrolled"].ToString().ToLower() == "true"))
                    {
                        this.iswfcontrolled = true;
                    }
                    else
                    {
                        this.iswfcontrolled = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["cvenpuomprotocol"] != null)
                {
                    this.cvenpuomprotocol = ds.Tables[0].Rows[0]["cvenpuomprotocol"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cvenpuomprotocolname"] != null)
                {
                    this.cvenpuomprotocolname = ds.Tables[0].Rows[0]["cvenpuomprotocolname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cchanger"] != null)
                {
                    this.cchanger = ds.Tables[0].Rows[0]["cchanger"].ToString();
                }
                if (ds.Tables[0].Rows[0]["dclosedate"] != null && ds.Tables[0].Rows[0]["dclosedate"].ToString() != "")
                {
                    this.dclosedate = DateTime.Parse(ds.Tables[0].Rows[0]["dclosedate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cvoucherstate"] != null)
                {
                    this.cvoucherstate = ds.Tables[0].Rows[0]["cvoucherstate"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iflowid"] != null && ds.Tables[0].Rows[0]["iflowid"].ToString() != "")
                {
                    this.iflowid = int.Parse(ds.Tables[0].Rows[0]["iflowid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cflowname"] != null)
                {
                    this.cflowname = ds.Tables[0].Rows[0]["cflowname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bflowprocess"] != null && ds.Tables[0].Rows[0]["bflowprocess"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["bflowprocess"].ToString() == "1") || (ds.Tables[0].Rows[0]["bflowprocess"].ToString().ToLower() == "true"))
                    {
                        this.bflowprocess = true;
                    }
                    else
                    {
                        this.bflowprocess = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["bstoragearrivalorder"] != null && ds.Tables[0].Rows[0]["bstoragearrivalorder"].ToString() != "")
                {
                    this.bstoragearrivalorder = int.Parse(ds.Tables[0].Rows[0]["bstoragearrivalorder"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iprintcount"] != null && ds.Tables[0].Rows[0]["iprintcount"].ToString() != "")
                {
                    this.iprintcount = int.Parse(ds.Tables[0].Rows[0]["iprintcount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csysbarcode"] != null)
                {
                    this.csysbarcode = ds.Tables[0].Rows[0]["csysbarcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ccurrentauditor"] != null)
                {
                    this.ccurrentauditor = ds.Tables[0].Rows[0]["ccurrentauditor"].ToString();
                }
            }
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select * ");
            strSql.Append(" FROM [pu_ArrHead] ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        #endregion  Method
    }
}